summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-06-27 06:29:13 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-06-27 06:29:13 (GMT)
commit1791c224dd87ba86236c399c2c8ea916635981c2 (patch)
treeed4207cb94f48cdf4575ae90f0cb5bc64af17d58
parent297d104248ac78b7fdd520f904386a7536a11140 (diff)
downloadcpython-1791c224dd87ba86236c399c2c8ea916635981c2.zip
cpython-1791c224dd87ba86236c399c2c8ea916635981c2.tar.gz
cpython-1791c224dd87ba86236c399c2c8ea916635981c2.tar.bz2
use NULL not 0
-rw-r--r--Objects/abstract.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 38ddb0f..eec9532 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2191,9 +2191,8 @@ PyObject_CallMethod(PyObject *o, const char *name, const char *format, ...)
return null_error();
func = PyObject_GetAttrString(o, name);
- if (func == NULL) {
- return 0;
- }
+ if (func == NULL)
+ return NULL;
va_start(va, format);
retval = callmethod(func, format, va, 0);
@@ -2213,9 +2212,8 @@ _PyObject_CallMethodId(PyObject *o, _Py_Identifier *name,
return null_error();
func = _PyObject_GetAttrId(o, name);
- if (func == NULL) {
- return 0;
- }
+ if (func == NULL)
+ return NULL;
va_start(va, format);
retval = callmethod(func, format, va, 0);
@@ -2235,9 +2233,8 @@ _PyObject_CallMethod_SizeT(PyObject *o, const char *name,
return null_error();
func = PyObject_GetAttrString(o, name);
- if (func == NULL) {
- return 0;
- }
+ if (func == NULL)
+ return NULL;
va_start(va, format);
retval = callmethod(func, format, va, 1);
va_end(va);