diff src/http/ngx_http_variables.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 76d5af541412
children f62751dab60d
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -872,7 +872,7 @@ ngx_http_variable_server_addr(ngx_http_r
 {
     ngx_str_t  s;
 
-    s.data = ngx_pnalloc(r->pool, INET_ADDRSTRLEN);
+    s.data = ngx_pnalloc(r->pool, NGX_INET_ADDRSTRLEN);
     if (s.data == NULL) {
         return NGX_ERROR;
     }