com php-src: optimize path length retrieval: main/fopen_wrapp ers.c

From: Date: Mon, 15 Sep 2014 08:43:38 +0000
Subject: com php-src: optimize path length retrieval: main/fopen_wrapp ers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81628@lists.php.net to get a copy of this message
Commit: ed55d52fa7bca002a1e2655490f804d0275c03fa Author: Kalle Sommer Nielsen <kalle@php.net> Mon, 15 Sep 2014 10:35:39 +0200 Committer: Anatol Belski <ab@php.net> Mon, 15 Sep 2014 10:43:38 +0200 Parents: 325bf067af9c55f388d66d098c6817a45d903f92 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ed55d52fa7bca002a1e2655490f804d0275c03fa Log: optimize path length retrieval Changed paths: M main/fopen_wrappers.c Diff: diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 7afa04c..a4aa10f 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -759,11 +759,15 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co cwd_state new_state; char cwd[MAXPATHLEN]; int copy_len; - int path_len = (int)strlen(filepath); + int path_len; if (!filepath[0]) { return NULL; - } else if (IS_ABSOLUTE_PATH(filepath, path_len)) { + } + + path_len = (int)strlen(filepath); + + if (IS_ABSOLUTE_PATH(filepath, path_len)) { cwd[0] = '\0'; } else { const char *iam = SG(request_info).path_translated;

« previous php.cvs (#81628) next »