Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb588a1

Browse files
committed
Switch to more idiomatic C code.
1 parent 135d5f4 commit eb588a1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Python/ceval.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3399,10 +3399,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
33993399
/* If there's a conversion function, call it and replace
34003400
value with that result. Otherwise, just use value,
34013401
without conversion. */
3402-
if (conv_fn) {
3402+
if (conv_fn != NULL) {
34033403
result = conv_fn(value);
34043404
Py_DECREF(value);
3405-
if (!result) {
3405+
if (result == NULL) {
34063406
Py_XDECREF(fmt_spec);
34073407
goto error;
34083408
}
@@ -3422,8 +3422,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
34223422
result = PyObject_Format(value, fmt_spec);
34233423
Py_DECREF(value);
34243424
Py_XDECREF(fmt_spec);
3425-
if (!result)
3425+
if (result == NULL) {
34263426
goto error;
3427+
}
34273428
}
34283429

34293430
PUSH(result);

0 commit comments

Comments
 (0)