diff options
author | Anatol Belski <ab@php.net> | 2018-02-05 12:42:59 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-02-05 20:42:17 +0100 |
commit | 7a4573a55ad244b66c40b4086e432775b6f185b7 (patch) | |
tree | 04a14f517282a599d84b35992d5077c369453cca /win32/ioutil.h | |
parent | ef20d2990fa0f0d97a7efdb9f77e5dad97fbf185 (diff) | |
download | php-git-7a4573a55ad244b66c40b4086e432775b6f185b7.tar.gz |
Improve conversion loop
Diffstat (limited to 'win32/ioutil.h')
-rw-r--r-- | win32/ioutil.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/win32/ioutil.h b/win32/ioutil.h index 41773b306e..c413b78b2a 100644 --- a/win32/ioutil.h +++ b/win32/ioutil.h @@ -376,7 +376,7 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char {/*{{{*/ FILE *ret; wchar_t modew[16] = {0}; - int err = 0, i = 0; + int err = 0, i; PHP_WIN32_IOUTIL_INIT_W(patha) if (!pathw) { @@ -386,9 +386,8 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char PHP_WIN32_IOUTIL_CHECK_PATH_W(pathw, NULL, 1) - while (i < (sizeof(modew)-1)/sizeof(wchar_t) && modea[i]) { + for (i = 0; i < (sizeof(modew)-1)/sizeof(wchar_t); i++) { modew[i] = (wchar_t)modea[i]; - i++; } ret = php_win32_ioutil_fopen_w(pathw, modew); |