]> granicus.if.org Git - php/commitdiff
- Add a comment why not ~0 or -1.
authorDerick Rethans <derick@php.net>
Thu, 6 Sep 2007 13:27:31 +0000 (13:27 +0000)
committerDerick Rethans <derick@php.net>
Thu, 6 Sep 2007 13:27:31 +0000 (13:27 +0000)
ext/standard/basic_functions.c

index 01beaf8fb2a4a0649af70d38f892129a1ec46a0d..45106f1cb1200e08b06c6eb0054cdbbf6b8b0292 100644 (file)
@@ -4280,7 +4280,8 @@ PHP_FUNCTION(ip2long)
 
        if (addr_len == 0 || (ip = inet_addr(addr)) == INADDR_NONE) {
                /* the only special case when we should return -1 ourselves,
-                * because inet_addr() considers it wrong.
+                * because inet_addr() considers it wrong. We return 0xFFFFFFFF and
+                * not -1 or ~0 because of 32/64bit issues.
                 */
                if (addr_len == sizeof("255.255.255.255") - 1 &&
                        !memcmp(addr, "255.255.255.255", sizeof("255.255.255.255") - 1)) {