Skip to content

Commit

Permalink
lib/getrange.c: getrange(): Return early to remove an else
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar authored and hallyn committed May 4, 2024
1 parent 8d8062c commit 62a4daa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/getrange.c
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

0 comments on commit 62a4daa

Please sign in to comment.