mirror of
https://github.com/nginx/nginx.git
synced 2024-12-14 03:39:00 +08:00
Reduced the number of lines of code in ngx_inet_addr().
This commit is contained in:
parent
3f25e12517
commit
3995395dcb
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user