summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_inet.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-08-21 18:47:23 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-08-21 18:47:23 +0000
commit6a75019ad6847a5bf8c0dcd1f0ad87ed715add7e (patch)
treef7feb9bb2be60866bf079e19c0736dc0d3f160f3 /src/core/ngx_inet.h
parentbbe42c41e8f883185745706f92426aa9e73b3eab (diff)
downloadnginx-6a75019ad6847a5bf8c0dcd1f0ad87ed715add7e.tar.gz
nginx-6a75019ad6847a5bf8c0dcd1f0ad87ed715add7e.tar.bz2
*) 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
Diffstat (limited to 'src/core/ngx_inet.h')
-rw-r--r--src/core/ngx_inet.h3
1 files changed, 3 insertions, 0 deletions
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 <ngx_core.h>
+#define NGX_INET_ADDRSTRLEN (sizeof("255.255.255.255") - 1)
+
+
typedef struct {
in_addr_t addr;
in_addr_t mask;