cvs: php-src /ext/standard basic_functions.c
| From: | Derick Rethans | Date: | Thu, 06 Sep 2007 13:27:31 +0000 |
| Subject: | cvs: php-src /ext/standard basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-46078@lists.php.net to get a copy of this message | ||
derick Thu Sep 6 13:27:31 2007 UTC
Modified files:
/php-src/ext/standard basic_functions.c
Log:
- Add a comment why not ~0 or -1.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.871&r2=1.872&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.871 php-src/ext/standard/basic_functions.c:1.872
--- php-src/ext/standard/basic_functions.c:1.871 Sat Sep 1 18:37:27 2007
+++ php-src/ext/standard/basic_functions.c Thu Sep 6 13:27:31 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.871 2007/09/01 18:37:27 derick Exp $ */
+/* $Id: basic_functions.c,v 1.872 2007/09/06 13:27:31 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -4280,7 +4280,8 @@
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)) {