From: Derick Rethans Date: Thu, 6 Sep 2007 13:27:31 +0000 (+0000) Subject: - Add a comment why not ~0 or -1. X-Git-Tag: RELEASE_2_0_0a1~1870 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d57a9f689d3053fe62a6438053c4d67eb701877;p=php - Add a comment why not ~0 or -1. --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 01beaf8fb2..45106f1cb1 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -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)) {