From 6a75019ad6847a5bf8c0dcd1f0ad87ed715add7e Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 21 Aug 2008 18:47:23 +0000 Subject: *) 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 --- src/core/ngx_inet.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/ngx_inet.h') diff --git a/src/core/ngx_inet.h b/src/core/ngx_inet.h index 509f80ab6..95ba30ba7 100644 --- a/src/core/ngx_inet.h +++ b/src/core/ngx_inet.h @@ -12,6 +12,9 @@ #include +#define NGX_INET_ADDRSTRLEN (sizeof("255.255.255.255") - 1) + + typedef struct { in_addr_t addr; in_addr_t mask; -- cgit