summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-11-22 12:50:50 +0100
committerAnatol Belski <ab@php.net>2017-11-22 12:50:50 +0100
commite69fa2865f60810a3ad8cf333628a69a21dbf847 (patch)
treecaa1543a70661709e36966ac4e29a93c3a898f1d
parented0a58d0ae362be49bc26523303b925bcdaa0a84 (diff)
downloadphp-git-e69fa2865f60810a3ad8cf333628a69a21dbf847.tar.gz
Eliminate cast
-rw-r--r--main/php_scandir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/php_scandir.c b/main/php_scandir.c
index 2bfecee3ae..0a26267a16 100644
--- a/main/php_scandir.c
+++ b/main/php_scandir.c
@@ -73,7 +73,7 @@ PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int (*se
}
while (!php_readdir_r(dirp, (struct dirent *)entry, &dp) && dp) {
- int dsize = 0;
+ size_t dsize = 0;
struct dirent *newdp = NULL;
if (selector && (*selector)(dp) == 0) {
@@ -95,7 +95,7 @@ PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int (*se
vector = newv;
}
- dsize = sizeof (struct dirent) + (((int)strlen(dp->d_name) + 1) * sizeof(char));
+ dsize = sizeof (struct dirent) + ((strlen(dp->d_name) + 1) * sizeof(char));
newdp = (struct dirent *) malloc(dsize);
if (newdp == NULL) {