summaryrefslogtreecommitdiff
path: root/Zend/zend_virtual_cwd.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-19 15:44:04 +0200
committerAnatol Belski <ab@php.net>2014-09-19 16:30:03 +0200
commit149db936d43ba31bb41da62b0d26d510f32514ee (patch)
tree01d650eef431375c05e8a7524d12b8a96a8847ac /Zend/zend_virtual_cwd.h
parent469c9bdb392ab0d8c91d7e2ab5ff93c650489143 (diff)
downloadphp-git-149db936d43ba31bb41da62b0d26d510f32514ee.tar.gz
expand IS_ABSOLUTE_PATH on Windows, so then strlen() isn't called twice
Diffstat (limited to 'Zend/zend_virtual_cwd.h')
-rw-r--r--Zend/zend_virtual_cwd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_virtual_cwd.h b/Zend/zend_virtual_cwd.h
index 3c432de9ad..8bc0d272b7 100644
--- a/Zend/zend_virtual_cwd.h
+++ b/Zend/zend_virtual_cwd.h
@@ -70,7 +70,7 @@ typedef unsigned short mode_t;
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#define IS_ABSOLUTE_PATH(path, len) \
- (len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len)))
+ (len >= 2 && ((/* is local */isalpha(path[0]) && path[1] == ':') || /* is UNC */IS_SLASH(path[0]) && IS_SLASH(path[1])))
#elif defined(NETWARE)
#ifdef HAVE_DIRENT_H