]> granicus.if.org Git - php/commitdiff
clean up macros
authorSascha Schumann <sas@php.net>
Wed, 4 Jun 2003 00:01:00 +0000 (00:01 +0000)
committerSascha Schumann <sas@php.net>
Wed, 4 Jun 2003 00:01:00 +0000 (00:01 +0000)
TSRM/tsrm_virtual_cwd.c

index 2c41fa9bb0f4381f590ad1d367598b71ca4fbb30..fd27f70666d6c4277e22ee5bf76a24c1c6c158f4 100644 (file)
@@ -92,7 +92,7 @@ static int php_check_dots(const char *element, int n)
        (len >= 2 && !php_check_dots(element, len))
 
 #define IS_DIRECTORY_CURRENT(element, len) \
-       (len == 1 && ptr[0] == '.')
+       (len == 1 && element[0] == '.')
 
 #elif defined(NETWARE)
 /* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
@@ -111,12 +111,12 @@ static int php_check_dots(const char *element, int n)
 
 #ifndef IS_DIRECTORY_UP
 #define IS_DIRECTORY_UP(element, len) \
-       (len == 2 && memcmp(element, "..", 2) == 0)
+       (len == 2 && element[0] == '.' && element[1] == '.')
 #endif
 
 #ifndef IS_DIRECTORY_CURRENT
 #define IS_DIRECTORY_CURRENT(element, len) \
-       (len == 1 && ptr[0] == '.')
+       (len == 1 && element[0] == '.')
 #endif
 
 /* define this to check semantics */