From 7f6b2ffc60135a8340213fe8d5d0b70e479e3ac1 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 17 Jun 2008 15:00:30 +0000 Subject: *) back out r2040 *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header --- src/core/ngx_connection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/ngx_connection.c') diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index b49a696f2..03662b398 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -36,7 +36,7 @@ ngx_listening_inet_stream_socket(ngx_conf_t *cf, in_addr_t addr, in_port_t port) 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 *cycle) 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; } -- cgit