diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:55:33 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:55:33 +0000 |
commit | 328df7a5cc91180fef3b1b58129e14bc79bef80b (patch) | |
tree | 1c5d8228b26c522371e2edc164f7d9104401f463 /src/http/ngx_http_upstream.c | |
parent | 5739072cfe7ecd27a1f4f70f68b508f54d9d3a75 (diff) | |
download | nginx-328df7a5cc91180fef3b1b58129e14bc79bef80b.tar.gz nginx-328df7a5cc91180fef3b1b58129e14bc79bef80b.zip |
use ngx_min() and ngx_max()
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r-- | src/http/ngx_http_upstream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 273d3575e..522a60536 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3710,7 +3710,7 @@ ngx_http_upstream_response_time_variable(ngx_http_request_t *r, if (state[i].status) { ms = (ngx_msec_int_t) (state[i].response_sec * 1000 + state[i].response_msec); - ms = (ms >= 0) ? ms : 0; + ms = ngx_max(ms, 0); p = ngx_sprintf(p, "%d.%03d", ms / 1000, ms % 1000); } else { |