com php-src: eliminate casts: main/streams/plain_wrapper.c

From: Date: Mon, 10 Jul 2017 13:48:54 +0000
Subject: com php-src: eliminate casts: main/streams/plain_wrapper.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98496@lists.php.net to get a copy of this message
Commit: 2283b6ff534e173bc56dc73137fedd19f37fc979 Author: Anatol Belski <ab@php.net> Mon, 10 Jul 2017 15:48:54 +0200 Parents: e0809fe62d1d92ca5a06b96ee5b859ba5a721f35 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2283b6ff534e173bc56dc73137fedd19f37fc979 Log: eliminate casts Changed paths: M main/streams/plain_wrapper.c Diff: diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 7e18941..a542913 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -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

« previous php.cvs (#98496) next »