summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-06 01:16:01 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-06 01:16:01 (GMT)
commit3466bde1cc113750450ffed028cc6fc7c95faedd (patch)
tree231febf716064e61b742a058c60da523c8b30fe3 /Python/pythonrun.c
parentad8c83ad6b91bebbc124c0c36e67b9836ca3d90f (diff)
downloadcpython-3466bde1cc113750450ffed028cc6fc7c95faedd.zip
cpython-3466bde1cc113750450ffed028cc6fc7c95faedd.tar.gz
cpython-3466bde1cc113750450ffed028cc6fc7c95faedd.tar.bz2
Avoid calling functions with an empty string as format string
Directly pass NULL rather than an empty string.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 3fb6f15..1fc86c0 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -950,7 +950,7 @@ flush_io(void)
f = _PySys_GetObjectId(&PyId_stderr);
if (f != NULL) {
- r = _PyObject_CallMethodId(f, &PyId_flush, "");
+ r = _PyObject_CallMethodId(f, &PyId_flush, NULL);
if (r)
Py_DECREF(r);
else
@@ -958,7 +958,7 @@ flush_io(void)
}
f = _PySys_GetObjectId(&PyId_stdout);
if (f != NULL) {
- r = _PyObject_CallMethodId(f, &PyId_flush, "");
+ r = _PyObject_CallMethodId(f, &PyId_flush, NULL);
if (r)
Py_DECREF(r);
else