1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 07:02:33 +02:00

expand IS_ABSOLUTE_PATH on Windows, so then strlen() isn't called twice

This commit is contained in:
Anatol Belski
2014-09-19 15:44:04 +02:00
parent 469c9bdb39
commit 149db936d4

View File

@@ -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