ngx_int_t
ngx_atoi(u_char *line, size_t n)
{
    ngx_int_t  value, cutoff, cutlim;
    if (n == 0) {
        return NGX_ERROR;
    }
    cutoff = NGX_MAX_INT_T_VALUE / 10;
    cutlim = NGX_MAX_INT_T_VALUE % 10;
    for (value = 0; n--; line++) {
        if (*line < '0' || *line > '9') {
            return NGX_ERROR;
        }
        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {
            return NGX_ERROR;
        }
        value = value * 10 + (*line - '0');
    }
    return value;
}
['char *\nngx_http_file_cache_valid_set_slot(ngx_conf_t *cf, ngx_command_t *cmd,\n    void *conf)\n{\n    char  *p = conf;\n    time_t                    valid;\n    ngx_str_t                *value;\n    ngx_int_t                 status;\n    ngx_uint_t                i, n;\n    ngx_array_t             **a;\n    ngx_http_cache_valid_t   *v;\n    static ngx_uint_t         statuses[] = { 200, 301, 302 };\n    a = (ngx_array_t **) (p + cmd->offset);\n    if (*a == NGX_CONF_UNSET_PTR) {\n        *a = ngx_array_create(cf->pool, 1, sizeof(ngx_http_cache_valid_t));\n        if (*a == NULL) {\n            return NGX_CONF_ERROR;\n        }\n    }\n    value = cf->args->elts;\n    n = cf->args->nelts - 1;\n    valid = ngx_parse_time(&value[n], 1);\n    if (valid == (time_t) NGX_ERROR) {\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid time value \\"%V\\"", &value[n]);\n        return NGX_CONF_ERROR;\n    }\n    if (n == 1) {\n        for (i = 0; i < 3; i++) {\n            v = ngx_array_push(*a);\n            if (v == NULL) {\n                return NGX_CONF_ERROR;\n            }\n            v->status = statuses[i];\n            v->valid = valid;\n        }\n        return NGX_CONF_OK;\n    }\n    for (i = 1; i < n; i++) {\n        if (ngx_strcmp(value[i].data, "any") == 0) {\n            status = 0;\n        } else {\n            status = ngx_atoi(value[i].data, value[i].len);\n            if (status < 100 || status > 599) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid status \\"%V\\"", &value[i]);\n                return NGX_CONF_ERROR;\n            }\n        }\n        v = ngx_array_push(*a);\n        if (v == NULL) {\n            return NGX_CONF_ERROR;\n        }\n        v->status = status;\n        v->valid = valid;\n    }\n    return NGX_CONF_OK;\n}', "ngx_int_t\nngx_atoi(u_char *line, size_t n)\n{\n    ngx_int_t  value, cutoff, cutlim;\n    if (n == 0) {\n        return NGX_ERROR;\n    }\n    cutoff = NGX_MAX_INT_T_VALUE / 10;\n    cutlim = NGX_MAX_INT_T_VALUE % 10;\n    for (value = 0; n--; line++) {\n        if (*line < '0' || *line > '9') {\n            return NGX_ERROR;\n        }\n        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {\n            return NGX_ERROR;\n        }\n        value = value * 10 + (*line - '0');\n    }\n    return value;\n}"]