Skip to content
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

Some getrange() simplification #980

Merged
merged 9 commits into from
May 4, 2024
Prev Previous commit
Next Next commit
lib/getrange.c: getrange(): Return early to remove an else
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar committed Apr 16, 2024
commit cf790923479b3f452e98ca7692da0444aa1d1b8a
6 changes: 3 additions & 3 deletions lib/getrange.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ getrange(const char *range,
break;
case '-':
endptr++;
if ('\0' == *endptr) {
/* <long>- */
} else if (!isdigit (*endptr)) {
if ('\0' == *endptr)
return 0; /* <long>- */
if (!isdigit (*endptr)) {
return -1;
} else {
errno = 0;
Expand Down