From d2603475dc68b5423b119f4617670b3ac815ccd5 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 24 Sep 2024 00:17:01 +0100 Subject: [PATCH] Remove some dead code from nxt_term_parse() 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 --- src/nxt_time_parse.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/nxt_time_parse.c b/src/nxt_time_parse.c index 520ac2f7c..3a6565dd7 100644 --- a/src/nxt_time_parse.c +++ b/src/nxt_time_parse.c @@ -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; }