derick Thu Sep 6 13:28:05 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard basic_functions.c
Log:
- MFH: Add a comment why not ~0 or -1.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.63&r2=1.725.2.31.2.64&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.63
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.63 Sat Sep 1
18:38:38 2007
+++ php-src/ext/standard/basic_functions.c Thu Sep 6 13:28:05 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.725.2.31.2.63 2007/09/01 18:38:38 derick Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64 2007/09/06 13:28:05 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -4336,7 +4336,8 @@
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)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php