comparison src/core/ngx_inet.c @ 5037:032f71d771e6 stable-1.2

Merge of r4945, r4984: ngx_inet.[ch] minor fixes. *) Fixed the NGX_SOCKADDR_STRLEN macro definition. The ngx_sock_ntop() function, when told to print both address and port, prints IPv6 address in square brackets, followed by colon and port. *) Properly initialize "struct in6_addr" with zeroes.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 10 Feb 2013 02:56:03 +0000
parents bb08178f23b0
children
comparison
equal deleted inserted replaced
5036:6e374742043e 5037:032f71d771e6
463 463
464 /* 464 /*
465 * prevent MSVC8 warning: 465 * prevent MSVC8 warning:
466 * potentially uninitialized local variable 'inaddr6' used 466 * potentially uninitialized local variable 'inaddr6' used
467 */ 467 */
468 ngx_memzero(inaddr6.s6_addr, sizeof(struct in6_addr)); 468 ngx_memzero(&inaddr6, sizeof(struct in6_addr));
469 #endif 469 #endif
470 470
471 inaddr = ngx_inet_addr(text, len); 471 inaddr = ngx_inet_addr(text, len);
472 472
473 if (inaddr != INADDR_NONE) { 473 if (inaddr != INADDR_NONE) {