diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-06 01:16:01 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-06 01:16:01 (GMT) |
commit | 3466bde1cc113750450ffed028cc6fc7c95faedd (patch) | |
tree | 231febf716064e61b742a058c60da523c8b30fe3 /Modules/faulthandler.c | |
parent | ad8c83ad6b91bebbc124c0c36e67b9836ca3d90f (diff) | |
download | cpython-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 'Modules/faulthandler.c')
-rw-r--r-- | Modules/faulthandler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index d6322d0..8969b4c 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -168,7 +168,7 @@ faulthandler_get_fileno(PyObject **file_ptr) return fd; } - result = _PyObject_CallMethodId(file, &PyId_fileno, ""); + result = _PyObject_CallMethodId(file, &PyId_fileno, NULL); if (result == NULL) return -1; @@ -186,7 +186,7 @@ faulthandler_get_fileno(PyObject **file_ptr) return -1; } - result = _PyObject_CallMethodId(file, &PyId_flush, ""); + result = _PyObject_CallMethodId(file, &PyId_flush, NULL); if (result != NULL) Py_DECREF(result); else { @@ -1290,7 +1290,7 @@ faulthandler_env_options(void) if (module == NULL) { return -1; } - res = _PyObject_CallMethodId(module, &PyId_enable, ""); + res = _PyObject_CallMethodId(module, &PyId_enable, NULL); Py_DECREF(module); if (res == NULL) return -1; |