mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
Avoid calling functions with an empty string as format string
Directly pass NULL rather than an empty string.
This commit is contained in:
parent
ad8c83ad6b
commit
3466bde1cc
13 changed files with 34 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue