Skip to content

Commit 9baf84e

Browse files
committed
Drop unused code
1 parent 32db45c commit 9baf84e

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

win32/ioutil.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -670,9 +670,6 @@ PW32IO FILE *php_win32_ioutil_fopen_w(const wchar_t *path, const wchar_t *mode)
670670
{/*{{{*/
671671
FILE *ret;
672672
char modea[16] = {0};
673-
#if 0
674-
char *modea;
675-
#endif
676673
int err = 0, fd, flags, i = 0;
677674

678675
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)
682679
modea[i] = (char)mode[i];
683680
i++;
684681
}
685-
#if 0
686-
modea = php_win32_cp_w_to_any(mode);
687-
if (!modea) {
688-
err = GetLastError();
689-
SET_ERRNO_FROM_WIN32_CODE(err);
690-
return NULL;
691-
}
692-
#endif
693682
if (SUCCESS != php_stream_parse_fopen_modes(modea, &flags)) {
694-
#if 0
695-
free(modea);
696-
#endif
697683
SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
698684
return NULL;
699685
}
700-
#if 0
701-
free(modea);
702-
#endif
703686

704687
fd = php_win32_ioutil_open_w(path, flags, 0666);
705688
if (0 > fd) {

win32/ioutil.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,6 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char
376376
{/*{{{*/
377377
FILE *ret;
378378
wchar_t modew[16] = {0};
379-
#if 0
380-
wchar_t *modew;
381-
#endif
382379
int err = 0, i = 0;
383380

384381
PHP_WIN32_IOUTIL_INIT_W(patha)
@@ -393,30 +390,16 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char
393390
modew[i] = (wchar_t)modea[i];
394391
i++;
395392
}
396-
#if 0
397-
modew = php_win32_cp_ascii_to_w(modea);
398-
if (!modew) {
399-
PHP_WIN32_IOUTIL_CLEANUP_W()
400-
SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
401-
return NULL;
402-
}
403-
#endif
404393

405394
ret = php_win32_ioutil_fopen_w(pathw, modew);
406395
if (!ret) {
407396
err = GetLastError();
408397
PHP_WIN32_IOUTIL_CLEANUP_W()
409-
#if 0
410-
free(modew);
411-
#endif
412398
SET_ERRNO_FROM_WIN32_CODE(err);
413399
return NULL;
414400
}
415401

416402
PHP_WIN32_IOUTIL_CLEANUP_W()
417-
#if 0
418-
free(modew);
419-
#endif
420403

421404
return ret;
422405
}/*}}}*/

0 commit comments

Comments
 (0)