mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Change long2ip return type (#13395)
This commit is contained in:
parent
eaaffae555
commit
e7b1f2a95b
5 changed files with 12 additions and 9 deletions
|
@ -643,11 +643,10 @@ PHP_FUNCTION(long2ip)
|
|||
ip = (zend_ulong)sip;
|
||||
|
||||
myaddr.s_addr = htonl(ip);
|
||||
if (inet_ntop(AF_INET, &myaddr, str, sizeof(str))) {
|
||||
RETURN_STRING(str);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
const char* result = inet_ntop(AF_INET, &myaddr, str, sizeof(str));
|
||||
ZEND_ASSERT(result != NULL);
|
||||
|
||||
RETURN_STRING(str);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue