tony2001                Thu Aug 19 11:15:33 2004 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/ext/standard       basic_functions.c 
  Log:
  MFH: ip2long() issues
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.673.2.3&r2=1.673.2.4&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.673.2.3 
php-src/ext/standard/basic_functions.c:1.673.2.4
--- php-src/ext/standard/basic_functions.c:1.673.2.3    Thu Aug 19 10:03:44 2004
+++ php-src/ext/standard/basic_functions.c      Thu Aug 19 11:15:32 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.673.2.3 2004/08/19 14:03:44 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.673.2.4 2004/08/19 15:15:32 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1280,14 +1280,14 @@
 
        convert_to_string_ex(str);
 
-       /* the only special case when we should return -1 ourselves,
-        * because inet_addr() considers it wrong.
-        */
-       if (!strcasecmp(Z_STRVAL_PP(str), "255.255.255.255")) {
-               RETURN_LONG(-1);
-       }
-
        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.
+                */
+               if (!memcmp(Z_STRVAL_PP(str), "255.255.255.255", Z_STRLEN_PP(str))) {
+                       RETURN_LONG(-1);
+               }
+               
                RETURN_FALSE;
        }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to