Avoid calling functions with an empty string as format string
Directly pass NULL rather than an empty string.
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 @@
return fd;
}
- result = _PyObject_CallMethodId(file, &PyId_fileno, "");
+ result = _PyObject_CallMethodId(file, &PyId_fileno, NULL);
if (result == NULL)
return -1;
@@ -186,7 +186,7 @@
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 @@
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;