From: Stefan Krah Date: Fri, 8 Nov 2013 16:48:58 +0000 (+0100) Subject: Change style to match the surrounding code (no early returns). X-Git-Tag: v3.4.0b1~334^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0fd1f5a187a001650ade75fbfe97418705beff8;p=thirdparty%2FPython%2Fcpython.git Change style to match the surrounding code (no early returns). --- diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 6f9e9def4746..aec3949c7901 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -3010,12 +3010,11 @@ convert_op_cmp(PyObject **vcmp, PyObject **wcmp, PyObject *v, PyObject *w, } } else { - int is_instance = PyObject_IsInstance(w, Rational); - if (is_instance < 0) { + int is_rational = PyObject_IsInstance(w, Rational); + if (is_rational < 0) { *wcmp = NULL; - return 0; } - if (is_instance) { + else if (is_rational > 0) { *wcmp = numerator_as_decimal(w, context); if (*wcmp && !mpd_isspecial(MPD(v))) { *vcmp = multiply_by_denominator(v, w, context);