Skip to content

Commit 2283b6f

Browse files
committed
eliminate casts
1 parent e0809fe commit 2283b6f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

main/streams/plain_wrapper.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,8 +1229,7 @@ static int php_plain_files_mkdir(php_stream_wrapper *wrapper, const char *dir, i
12291229
/* we look for directory separator from the end of string, thus hopefuly reducing our work load */
12301230
char *e;
12311231
zend_stat_t sb;
1232-
int dir_len = (int)strlen(dir);
1233-
int offset = 0;
1232+
size_t dir_len = strlen(dir), offset = 0;
12341233
char buf[MAXPATHLEN];
12351234

12361235
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
14381437
const char *ptr;
14391438
char trypath[MAXPATHLEN];
14401439
php_stream *stream;
1441-
int filename_length;
1440+
size_t filename_length;
14421441
zend_string *exec_filename;
14431442

14441443
if (opened_path) {
@@ -1449,7 +1448,7 @@ PHPAPI php_stream *_php_stream_fopen_with_path(const char *filename, const char
14491448
return NULL;
14501449
}
14511450

1452-
filename_length = (int)strlen(filename);
1451+
filename_length = strlen(filename);
14531452
#ifndef PHP_WIN32
14541453
(void) filename_length;
14551454
#endif

0 commit comments

Comments
 (0)