Skip to content

Commit

Permalink
Restore braces in m_log2 per PEP7
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Feb 9, 2023
1 parent fa76552 commit 42829cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Modules/mathmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,9 @@ m_log2(double x)
}
}

if (x > 0.0)
if (x > 0.0) {
return log2(x);
}
else if (x == 0.0) {
errno = EDOM;
return -Py_HUGE_VAL; /* log2(0) = -inf, divide-by-zero */
Expand Down

0 comments on commit 42829cb

Please sign in to comment.