File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -442,18 +442,20 @@ checked_divmod(PyObject *a, PyObject *b)
442442static PyObject *
443443divide_and_round (PyObject * numerator , PyObject * denominator , _PyTime_round_t round )
444444{
445- PyObject * divmod , * result ;
446445 if (round == _PyTime_ROUND_UP ) {
447446 int isneg = PyObject_RichCompareBool (numerator , _PyLong_GetZero (), Py_LT );
448447 if (isneg < 0 ) {
449448 return NULL ;
450449 }
451450 round = isneg ? _PyTime_ROUND_FLOOR : _PyTime_ROUND_CEILING ;
452451 }
452+
453453 if (round == _PyTime_ROUND_FLOOR ) {
454454 return PyNumber_FloorDivide (numerator , denominator );
455455 }
456- else if (round == _PyTime_ROUND_CEILING ) {
456+
457+ PyObject * divmod , * result ;
458+ if (round == _PyTime_ROUND_CEILING ) {
457459 divmod = checked_divmod (numerator , denominator );
458460 if (divmod == NULL ) {
459461 return NULL ;
You can’t perform that action at this time.
0 commit comments