]> granicus.if.org Git - php/commitdiff
Reduce variable scope
authorAnatol Belski <ab@php.net>
Thu, 15 Feb 2018 20:18:58 +0000 (21:18 +0100)
committerAnatol Belski <ab@php.net>
Thu, 15 Feb 2018 20:18:58 +0000 (21:18 +0100)
win32/ioutil.h

index 41773b306ec3b8fa8cede449a975fe56e9fb81a2..5e25333936dd131866d5dfeecabffba0635d4cd7 100644 (file)
@@ -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 i = 0;
 
        PHP_WIN32_IOUTIL_INIT_W(patha)
        if (!pathw) {
@@ -393,7 +393,7 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char
 
        ret = php_win32_ioutil_fopen_w(pathw, modew);
        if (!ret) {
-               err = GetLastError();
+               int err = GetLastError();
                PHP_WIN32_IOUTIL_CLEANUP_W()
                SET_ERRNO_FROM_WIN32_CODE(err);
                return NULL;