From 3466bde1cc113750450ffed028cc6fc7c95faedd Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 5 Sep 2016 18:16:01 -0700 Subject: Avoid calling functions with an empty string as format string Directly pass NULL rather than an empty string. --- Python/traceback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/traceback.c') diff --git a/Python/traceback.c b/Python/traceback.c index b33156eaa7..e8aac1bad8 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -314,7 +314,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) if (fob == NULL) { PyErr_Clear(); - res = _PyObject_CallMethodId(binary, &PyId_close, ""); + res = _PyObject_CallMethodId(binary, &PyId_close, NULL); Py_DECREF(binary); if (res) Py_DECREF(res); @@ -334,7 +334,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) break; } } - res = _PyObject_CallMethodId(fob, &PyId_close, ""); + res = _PyObject_CallMethodId(fob, &PyId_close, NULL); if (res) Py_DECREF(res); else -- cgit v1.2.1