summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-06-04 00:01:21 +0000
committerSascha Schumann <sas@php.net>2003-06-04 00:01:21 +0000
commit4d361edd91af8c6208a8b7004b552fdf7a0692cb (patch)
treec799b0ba8a446318df36262e0ed2c60ffbb97bc5 /TSRM
parente1b8cad26fde3db31e80e205bb22c5a0c8a7e1a0 (diff)
downloadphp-git-4d361edd91af8c6208a8b7004b552fdf7a0692cb.tar.gz
cleanup macros
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index d62745ad32..519666d713 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -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 */