*) 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
This commit is contained in:
Igor Sysoev
2008-08-21 18:47:23 +00:00
parent bbe42c41e8
commit 6a75019ad6
11 changed files with 40 additions and 166 deletions

View File

@@ -116,10 +116,6 @@ typedef intptr_t ngx_flag_t;
#define INADDR_NONE ((unsigned int) -1)
#endif
#ifndef INET_ADDRSTRLEN /* Win32 */
#define INET_ADDRSTRLEN 16
#endif
#ifdef MAXHOSTNAMELEN
#define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN
#else