From e280715150e01edabae3ae43edb710ab55987a83 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 6 Sep 2007 13:28:05 +0000 Subject: - MFH: Add a comment why not ~0 or -1. --- ext/standard/basic_functions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 5014f9fcb2..a063bfab1f 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4336,7 +4336,8 @@ PHP_FUNCTION(ip2long) if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) == 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 (Z_STRLEN_PP(str) == sizeof("255.255.255.255") - 1 && !memcmp(Z_STRVAL_PP(str), "255.255.255.255", sizeof("255.255.255.255") - 1)) { -- cgit v1.2.1