]> granicus.if.org Git - php/commitdiff
Drop unused code
authorAnatol Belski <ab@php.net>
Fri, 15 Dec 2017 14:00:20 +0000 (15:00 +0100)
committerAnatol Belski <ab@php.net>
Fri, 15 Dec 2017 14:00:20 +0000 (15:00 +0100)
win32/ioutil.c
win32/ioutil.h

index 11761ce9d9b8c11714ce5deedb21b0562a06524a..a2a5e74b3b39a9100f1d4e463815bd750a5f5c3e 100644 (file)
@@ -670,9 +670,6 @@ PW32IO FILE *php_win32_ioutil_fopen_w(const wchar_t *path, const wchar_t *mode)
 {/*{{{*/
        FILE *ret;
        char modea[16] = {0};
-#if 0
-       char *modea;
-#endif
        int err = 0, fd, flags, i = 0;
 
        PHP_WIN32_IOUTIL_CHECK_PATH_W(path, NULL, 0)
@@ -682,24 +679,10 @@ PW32IO FILE *php_win32_ioutil_fopen_w(const wchar_t *path, const wchar_t *mode)
                modea[i] = (char)mode[i];
                i++;
        }
-#if 0
-       modea = php_win32_cp_w_to_any(mode);
-       if (!modea) {
-               err = GetLastError();
-               SET_ERRNO_FROM_WIN32_CODE(err);
-               return NULL;
-       }
-#endif
        if (SUCCESS != php_stream_parse_fopen_modes(modea, &flags)) {
-#if 0
-               free(modea);
-#endif
                SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
                return NULL;
        }
-#if 0
-       free(modea);
-#endif
 
        fd = php_win32_ioutil_open_w(path, flags, 0666);
        if (0 > fd) {
index 301566ddda8c0703712a97cbd69a7f4c5d18d48d..36017cb4978c28ff7842bed9d543de68bb06227b 100644 (file)
@@ -376,9 +376,6 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char
 {/*{{{*/
        FILE *ret;
        wchar_t modew[16] = {0};
-#if 0
-       wchar_t *modew;
-#endif
        int err = 0, i = 0;
 
        PHP_WIN32_IOUTIL_INIT_W(patha)
@@ -393,30 +390,16 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char
                modew[i] = (wchar_t)modea[i];
                i++;
        }
-#if 0
-       modew = php_win32_cp_ascii_to_w(modea);
-       if (!modew) {
-               PHP_WIN32_IOUTIL_CLEANUP_W()
-               SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
-               return NULL;
-       }
-#endif
 
        ret = php_win32_ioutil_fopen_w(pathw, modew);
        if (!ret) {
                err = GetLastError();
                PHP_WIN32_IOUTIL_CLEANUP_W()
-#if 0
-               free(modew);
-#endif
                SET_ERRNO_FROM_WIN32_CODE(err);
                return NULL;
        }
 
        PHP_WIN32_IOUTIL_CLEANUP_W()
-#if 0
-       free(modew);
-#endif
 
        return ret;
 }/*}}}*/