Skip to content

Commit

Permalink
Remove some dead code from nxt_term_parse()
Browse files Browse the repository at this point in the history
This is the completion of the commits cleaning up nxt_term_parse().

In nxt_term_parse() we have a switch statement with a case label to
handle having a space (' '). AFAICT and have traced this code will never
trigger.

Remove it.

The src/test/nxt_term_parse_test.c still passes

  tests: [notice] term parse test passed

Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
ac000 committed Sep 23, 2024
1 parent b401e6b commit d260347
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/nxt_time_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,6 @@ nxt_term_parse(const u_char *p, size_t len, nxt_bool_t seconds)
scale = 1;
break;

case ' ':
if (step >= st_sec) {
return -1;
}
step = st_last;
max = NXT_INT32_T_MAX;
scale = 1;
break;

default:
return -1;
}
Expand Down

0 comments on commit d260347

Please sign in to comment.