mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Avoid multiple wcslen calls
This commit is contained in:
parent
22e7329d9a
commit
036a80037b
1 changed files with 2 additions and 1 deletions
|
@ -155,7 +155,8 @@ typedef enum {
|
||||||
(len) > 1 && !PHP_WIN32_IOUTIL_IS_SLASHW(pathw[(len)-2]) && L'.' != pathw[(len)-2] && L'.' == pathw[(len)-1]))
|
(len) > 1 && !PHP_WIN32_IOUTIL_IS_SLASHW(pathw[(len)-2]) && L'.' != pathw[(len)-2] && L'.' == pathw[(len)-1]))
|
||||||
|
|
||||||
#define PHP_WIN32_IOUTIL_CHECK_PATH_W(pathw, ret, dealloc) do { \
|
#define PHP_WIN32_IOUTIL_CHECK_PATH_W(pathw, ret, dealloc) do { \
|
||||||
if (!PHP_WIN32_IOUTIL_PATH_IS_OK_W(pathw, wcslen(pathw))) { \
|
size_t _len = wcslen(pathw); \
|
||||||
|
if (!PHP_WIN32_IOUTIL_PATH_IS_OK_W(pathw, _len)) { \
|
||||||
if (dealloc) { \
|
if (dealloc) { \
|
||||||
free((void *)pathw); \
|
free((void *)pathw); \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue