]> granicus.if.org Git - python/commitdiff
Switch to more idiomatic C code.
authorEric V. Smith <eric@trueblade.com>
Fri, 5 Feb 2016 23:26:20 +0000 (18:26 -0500)
committerEric V. Smith <eric@trueblade.com>
Fri, 5 Feb 2016 23:26:20 +0000 (18:26 -0500)
Python/ceval.c

index b815ccd9d0a97391df61283b38b77b15873480d2..8904d7acaffdce805cf9a4473659959ee0ec06f5 100644 (file)
@@ -3399,10 +3399,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             /* If there's a conversion function, call it and replace
                value with that result. Otherwise, just use value,
                without conversion. */
-            if (conv_fn) {
+            if (conv_fn != NULL) {
                 result = conv_fn(value);
                 Py_DECREF(value);
-                if (!result) {
+                if (result == NULL) {
                     Py_XDECREF(fmt_spec);
                     goto error;
                 }
@@ -3422,8 +3422,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 result = PyObject_Format(value, fmt_spec);
                 Py_DECREF(value);
                 Py_XDECREF(fmt_spec);
-                if (!result)
+                if (result == NULL) {
                     goto error;
+                }
             }
 
             PUSH(result);