com php-src: Eliminate cast: main/php_scandir.c
| From: | Anatol Belski | Date: | Wed, 22 Nov 2017 11:50:50 +0000 |
| Subject: | com php-src: Eliminate cast: main/php_scandir.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100345@lists.php.net to get a copy of this message | ||
Commit: e69fa2865f60810a3ad8cf333628a69a21dbf847
Author: Anatol Belski <ab@php.net> Wed, 22 Nov 2017 12:50:50 +0100
Parents: ed0a58d0ae362be49bc26523303b925bcdaa0a84
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e69fa2865f60810a3ad8cf333628a69a21dbf847
Log:
Eliminate cast
Changed paths:
M main/php_scandir.c
Diff:
diff --git a/main/php_scandir.c b/main/php_scandir.c
index 2bfecee..0a26267 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) {