mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
fix datatype mismatch
This commit is contained in:
parent
e048426402
commit
77ab77fd02
@ -37,7 +37,7 @@ DIR *opendir(const char *dir)
|
||||
return NULL;
|
||||
}
|
||||
strcpy(filespec, resolved_path_buff);
|
||||
index = strlen(filespec) - 1;
|
||||
index = (int)strlen(filespec) - 1;
|
||||
if (index >= 0 && (filespec[index] == '/' ||
|
||||
(filespec[index] == '\\' && (index == 0 || !IsDBCSLeadByte(filespec[index-1])))))
|
||||
filespec[index] = '\0';
|
||||
@ -83,7 +83,7 @@ struct dirent *readdir(DIR *dp)
|
||||
|
||||
strlcpy(dp->dent.d_name, dp->fileinfo.cFileName, _MAX_FNAME+1);
|
||||
dp->dent.d_ino = 1;
|
||||
dp->dent.d_reclen = strlen(dp->dent.d_name);
|
||||
dp->dent.d_reclen = (unsigned short)strlen(dp->dent.d_name);
|
||||
dp->dent.d_off = dp->offset;
|
||||
|
||||
return &(dp->dent);
|
||||
@ -107,7 +107,7 @@ int readdir_r(DIR *dp, struct dirent *entry, struct dirent **result)
|
||||
|
||||
strlcpy(dp->dent.d_name, dp->fileinfo.cFileName, _MAX_FNAME+1);
|
||||
dp->dent.d_ino = 1;
|
||||
dp->dent.d_reclen = strlen(dp->dent.d_name);
|
||||
dp->dent.d_reclen = (unsigned short)strlen(dp->dent.d_name);
|
||||
dp->dent.d_off = dp->offset;
|
||||
|
||||
memcpy(entry, &dp->dent, sizeof(*entry));
|
||||
@ -152,7 +152,7 @@ int rewinddir(DIR *dp)
|
||||
}
|
||||
|
||||
strcpy(filespec, dp->dir);
|
||||
index = strlen(filespec) - 1;
|
||||
index = (int)strlen(filespec) - 1;
|
||||
if (index >= 0 && (filespec[index] == '/' ||
|
||||
(filespec[index] == '\\' && (index == 0 || !IsDBCSLeadByte(filespec[index-1])))))
|
||||
filespec[index] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user