]> granicus.if.org Git - php/commitdiff
C89 compat
authorAnatol Belski <ab@php.net>
Mon, 1 Dec 2014 07:24:44 +0000 (08:24 +0100)
committerAnatol Belski <ab@php.net>
Mon, 1 Dec 2014 07:24:44 +0000 (08:24 +0100)
main/streams/plain_wrapper.c

index aae2f6da369d0c62c39b226aebe94bdbd6a7433f..a75c2d0122d986e6cf3af002b85b83e973548902 100644 (file)
@@ -1257,15 +1257,12 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, char *url, int opt
                url += sizeof("file://") - 1;
        }
 
-#if PHP_WIN32
-       int url_len = strlen(url);
-#endif
        if (php_check_open_basedir(url TSRMLS_CC)) {
                return 0;
        }
 
 #if PHP_WIN32
-       if (!php_win32_check_trailing_space(url, url_len)) {
+       if (!php_win32_check_trailing_space(url, (int)strlen(url))) {
                php_error_docref1(NULL TSRMLS_CC, url, E_WARNING, "%s", strerror(ENOENT));
                return 0;
        }