diff src/http/modules/ngx_http_status_module.c @ 2197:74477ea8074f

*) remove zero termination in ngx_inet_ntop() and ngx_sock_ntop() *) use ngx_snprintf() in ngx_inet_ntop() and ngx_sock_ntop() as they are called just once per connection *) NGX_INET_ADDRSTRLEN
author Igor Sysoev <igor@sysoev.ru>
date Thu, 21 Aug 2008 18:47:23 +0000
parents 63a820b0bc6c
children
line wrap: on
line diff
--- a/src/http/modules/ngx_http_status_module.c
+++ b/src/http/modules/ngx_http_status_module.c
@@ -155,7 +155,7 @@ static ngx_int_t ngx_http_status(ngx_htt
             len = NGX_INT64_LEN                       /* pid */
                   + 1 + NGX_INT32_LEN                 /* connection */
                   + 1 + 1                             /* state */
-                  + 1 + INET_ADDRSTRLEN
+                  + 1 + NGX_INET_ADDRSTRLEN
                   + 1 + (r->server_name ? cmcf->max_server_name_len : 1)
                   + 2;                                /* "\r\n" */
 
@@ -204,7 +204,7 @@ static ngx_int_t ngx_http_status(ngx_htt
             *(b->last++) = ' ';
             b->last = ngx_cpymem(b->last, c[i].addr_text.data,
                                  c[i].addr_text.len);
-            for (n = c[i].addr_text.len; n < INET_ADDRSTRLEN; n++) {
+            for (n = c[i].addr_text.len; n < NGX_INET_ADDRSTRLEN; n++) {
                  *(b->last++) = ' ';
             }