diff options
author | Anatol Belski <ab@php.net> | 2017-07-09 15:31:05 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-07-09 15:31:05 +0200 |
commit | 84079f4a1ef4c3c10ef81da33e75949ca8ab8347 (patch) | |
tree | b1e9488d1009f1b2a5bc344c9fd1413ba3eb7d18 /main/streams/plain_wrapper.c | |
parent | e403acc74b63d051ce8fd62f081c1302a720a590 (diff) | |
download | php-git-84079f4a1ef4c3c10ef81da33e75949ca8ab8347.tar.gz |
cleanup casts
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 537021abd6..7e1894138f 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1139,11 +1139,11 @@ static int php_plain_files_rename(php_stream_wrapper *wrapper, const char *url_f } #ifdef PHP_WIN32 - if (!php_win32_check_trailing_space(url_from, (int)strlen(url_from))) { + if (!php_win32_check_trailing_space(url_from, strlen(url_from))) { php_win32_docref2_from_error(ERROR_INVALID_NAME, url_from, url_to); return 0; } - if (!php_win32_check_trailing_space(url_to, (int)strlen(url_to))) { + if (!php_win32_check_trailing_space(url_to, strlen(url_to))) { php_win32_docref2_from_error(ERROR_INVALID_NAME, url_from, url_to); return 0; } @@ -1311,7 +1311,7 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, const char *url, i } #ifdef PHP_WIN32 - if (!php_win32_check_trailing_space(url, (int)strlen(url))) { + if (!php_win32_check_trailing_space(url, strlen(url))) { php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT)); return 0; } @@ -1337,12 +1337,9 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url #endif mode_t mode; int ret = 0; -#ifdef PHP_WIN32 - int url_len = (int)strlen(url); -#endif #ifdef PHP_WIN32 - if (!php_win32_check_trailing_space(url, url_len)) { + if (!php_win32_check_trailing_space(url, strlen(url))) { php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT)); return 0; } |