summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-05 18:16:01 -0700
committerVictor Stinner <victor.stinner@gmail.com>2016-09-05 18:16:01 -0700
commit06d0337c7565e35432fe744713260e2ef3e8a545 (patch)
treecefdbc40953cb4f4ed55076399b176ffd55d5cf8 /Python/pythonrun.c
parentb10682a8d65eacac79b39a62ff45a15e0ac95f05 (diff)
downloadcpython-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/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 3fb6f15dd7..1fc86c0a3e 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