aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-05-14 09:55:33 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-05-14 09:55:33 +0000
commit328df7a5cc91180fef3b1b58129e14bc79bef80b (patch)
tree1c5d8228b26c522371e2edc164f7d9104401f463 /src/http/modules
parent5739072cfe7ecd27a1f4f70f68b508f54d9d3a75 (diff)
downloadnginx-328df7a5cc91180fef3b1b58129e14bc79bef80b.tar.gz
nginx-328df7a5cc91180fef3b1b58129e14bc79bef80b.zip
use ngx_min() and ngx_max()
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_log_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index 0752d0394..1796ee27f 100644
--- 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_request_t *r, u_char *buf,
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);
}