]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Change style to match the surrounding code (no early returns).
authorStefan Krah <skrah@bytereef.org>
Fri, 8 Nov 2013 16:48:58 +0000 (17:48 +0100)
committerStefan Krah <skrah@bytereef.org>
Fri, 8 Nov 2013 16:48:58 +0000 (17:48 +0100)
Modules/_decimal/_decimal.c

index 6f9e9def4746c654cb6b5bc2e41e466bfe49937b..aec3949c7901d19a20ecf94b430f4fe5860efbba 100644 (file)
@@ -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);