diff src/core/ngx_connection.c @ 2049:2a92804f4109

*) back out r2040 *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
author Igor Sysoev <igor@sysoev.ru>
date Tue, 17 Jun 2008 15:00:30 +0000
parents 7018254cc006
children 74477ea8074f
line wrap: on
line diff
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -36,7 +36,7 @@ ngx_listening_inet_stream_socket(ngx_con
     sin->sin_port = htons(port);
 
 
-    ls->addr_text.data = ngx_palloc(cf->pool,
+    ls->addr_text.data = ngx_pnalloc(cf->pool,
                                     INET_ADDRSTRLEN - 1 + sizeof(":65535") - 1);
     if (ls->addr_text.data == NULL) {
         return NULL;
@@ -106,8 +106,8 @@ ngx_set_inherited_sockets(ngx_cycle_t *c
 
         ls[i].addr_text_max_len = INET_ADDRSTRLEN;
 
-        ls[i].addr_text.data = ngx_palloc(cycle->pool, INET_ADDRSTRLEN - 1
-                                                       + sizeof(":65535") - 1);
+        ls[i].addr_text.data = ngx_pnalloc(cycle->pool,
+                                   INET_ADDRSTRLEN - 1 + sizeof(":65535") - 1);
         if (ls[i].addr_text.data == NULL) {
             return NGX_ERROR;
         }