mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Eliminate cast
This commit is contained in:
parent
ed0a58d0ae
commit
e69fa2865f
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue