mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Use NULL rather than 0. (#778)
There was few cases of using literal 0 instead of NULL in the context of pointers. While this was a legitimate C code, using NULL rather than 0 makes the code clearer.
This commit is contained in:
parent
aefa7ebf0f
commit
0b3ec19225
8 changed files with 15 additions and 15 deletions
|
|
@ -2987,7 +2987,7 @@ PyCurses_tigetstr(PyObject *self, PyObject *args)
|
|||
return NULL;
|
||||
|
||||
capname = tigetstr( capname );
|
||||
if (capname == 0 || capname == (char*) -1) {
|
||||
if (capname == NULL || capname == (char*) -1) {
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
return PyBytes_FromString( capname );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue