]> granicus.if.org Git - php/commitdiff
eliminate casts
authorAnatol Belski <ab@php.net>
Mon, 10 Jul 2017 13:48:54 +0000 (15:48 +0200)
committerAnatol Belski <ab@php.net>
Mon, 10 Jul 2017 13:48:54 +0000 (15:48 +0200)
main/streams/plain_wrapper.c

index 7e1894138f854cdea5dba64d15ee7e12ff67114d..a5429138f3853593f75d297f617b545852274be9 100644 (file)
@@ -1229,8 +1229,7 @@ static int php_plain_files_mkdir(php_stream_wrapper *wrapper, const char *dir, i
                /* we look for directory separator from the end of string, thus hopefuly reducing our work load */
                char *e;
                zend_stat_t sb;
-               int dir_len = (int)strlen(dir);
-               int offset = 0;
+               size_t dir_len = strlen(dir), offset = 0;
                char buf[MAXPATHLEN];
 
                if (!expand_filepath_with_mode(dir, buf, NULL, 0, CWD_EXPAND )) {
@@ -1438,7 +1437,7 @@ PHPAPI php_stream *_php_stream_fopen_with_path(const char *filename, const char
        const char *ptr;
        char trypath[MAXPATHLEN];
        php_stream *stream;
-       int filename_length;
+       size_t filename_length;
        zend_string *exec_filename;
 
        if (opened_path) {
@@ -1449,7 +1448,7 @@ PHPAPI php_stream *_php_stream_fopen_with_path(const char *filename, const char
                return NULL;
        }
 
-       filename_length = (int)strlen(filename);
+       filename_length = strlen(filename);
 #ifndef PHP_WIN32
        (void) filename_length;
 #endif