aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_parse.c')
-rw-r--r--src/core/ngx_parse.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/ngx_parse.c b/src/core/ngx_parse.c
index 79f22f05e..aa385bf0e 100644
--- a/src/core/ngx_parse.c
+++ b/src/core/ngx_parse.c
@@ -121,7 +121,6 @@ ngx_parse_time(ngx_str_t *line, ngx_uint_t is_sec)
value = 0;
total = 0;
step = is_sec ? st_start : st_month;
- scale = is_sec ? 1 : 1000;
p = line->data;
last = p + line->len;
@@ -239,7 +238,6 @@ ngx_parse_time(ngx_str_t *line, ngx_uint_t is_sec)
}
value = 0;
- scale = is_sec ? 1 : 1000;
while (p < last && *p == ' ') {
p++;
@@ -247,7 +245,7 @@ ngx_parse_time(ngx_str_t *line, ngx_uint_t is_sec)
}
if (valid) {
- return total + value * scale;
+ return total + value * (is_sec ? 1 : 1000);
}
return NGX_ERROR;