Changeset 6010:040e2736e8dc in nginx


Ignore:
Timestamp:
03/16/15 21:26:18 (5 years ago)
Author:
Ruslan Ermilov <ru@…>
Branch:
default
Phase:
public
Message:

Refactored ngx_parse_time().

No functional changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/core/ngx_parse.c

    r6009 r6010  
    122122    total = 0;
    123123    step = is_sec ? st_start : st_month;
    124     scale = is_sec ? 1 : 1000;
    125124
    126125    p = line->data;
     
    240239
    241240        value = 0;
    242         scale = is_sec ? 1 : 1000;
    243241
    244242        while (p < last && *p == ' ') {
     
    248246
    249247    if (valid) {
    250         return total + value * scale;
     248        return total + value * (is_sec ? 1 : 1000);
    251249    }
    252250
Note: See TracChangeset for help on using the changeset viewer.