]> granicus.if.org Git - python/commitdiff
Style/consistency nit: make math_floor and math_ceil code look the same.
authorMark Dickinson <dickinsm@gmail.com>
Fri, 2 Jul 2010 16:05:15 +0000 (16:05 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Fri, 2 Jul 2010 16:05:15 +0000 (16:05 +0000)
Modules/mathmodule.c

index 9141805f74018a80294dcd29568e429dfa111c1d..4ef10d3d38937c2780f8334a1e7b9d9322925a57 100644 (file)
@@ -841,7 +841,7 @@ FUNC1(atanh, m_atanh, 0,
 
 static PyObject * math_ceil(PyObject *self, PyObject *number) {
     static PyObject *ceil_str = NULL;
-    PyObject *method;
+    PyObject *method, *result;
 
     method = _PyObject_LookupSpecial(number, "__ceil__", &ceil_str);
     if (method == NULL) {
@@ -849,11 +849,9 @@ static PyObject * math_ceil(PyObject *self, PyObject *number) {
             return NULL;
         return math_1_to_int(number, ceil, 0);
     }
-    else {
-        PyObject *result = PyObject_CallFunctionObjArgs(method, NULL);
-        Py_DECREF(method);
-        return result;
-    }
+    result = PyObject_CallFunctionObjArgs(method, NULL);
+    Py_DECREF(method);
+    return result;
 }
 
 PyDoc_STRVAR(math_ceil_doc,