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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user