diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-05 18:16:01 -0700 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-05 18:16:01 -0700 |
commit | 06d0337c7565e35432fe744713260e2ef3e8a545 (patch) | |
tree | cefdbc40953cb4f4ed55076399b176ffd55d5cf8 /Python/traceback.c | |
parent | b10682a8d65eacac79b39a62ff45a15e0ac95f05 (diff) | |
download | cpython-06d0337c7565e35432fe744713260e2ef3e8a545.tar.gz |
Avoid calling functions with an empty string as format string
Directly pass NULL rather than an empty string.
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |