Skip to content

BCmath extension code reformatting #11896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Return the boolean directly
  • Loading branch information
jorgsowa committed Aug 10, 2023
commit 04b901e5c68d398587e57132bcbe978c6e168aa7
6 changes: 1 addition & 5 deletions ext/bcmath/libbcmath/src/nearzero.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,5 @@ bool bc_is_near_zero(bc_num num, size_t scale)
count--;
}

if (count == 0 || (count == 1 && *--nptr == 1)) {
return true;
} else {
return false;
}
return count == 0 || (count == 1 && *--nptr == 1);
}