Mercurial > hg > nginx-quic
diff src/http/modules/ngx_http_log_module.c @ 3515:76d252724db5
use ngx_min() and ngx_max()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 14 May 2010 09:55:33 +0000 |
parents | bfe37ab335b5 |
children | dd1570b6f237 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c +++ b/src/http/modules/ngx_http_log_module.c @@ -533,7 +533,7 @@ ngx_http_log_request_time(ngx_http_reque ms = (ngx_msec_int_t) ((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec)); - ms = (ms >= 0) ? ms : 0; + ms = ngx_max(ms, 0); return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000); }