From: Ruslan Ermilov Date: Thu, 12 Apr 2012 10:20:33 +0000 (+0000) Subject: Reduced the number of lines of code in ngx_inet_addr(). X-Git-Tag: release-1.1.19~2 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=3995395dcb8de13ba633dfbf05585c9c8467ca61;p=nginx.git Reduced the number of lines of code in ngx_inet_addr(). --- diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c index 4fccc17ed..d2bbbfb58 100644 --- a/src/core/ngx_inet.c +++ b/src/core/ngx_inet.c @@ -44,11 +44,7 @@ ngx_inet_addr(u_char *text, size_t len) return INADDR_NONE; } - if (n != 3) { - return INADDR_NONE; - } - - if (octet < 256) { + if (n == 3 && octet < 256) { addr = (addr << 8) + octet; return htonl(addr); }