summaryrefslogtreecommitdiff
path: root/win32/readdir.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-12-22 14:56:47 +0100
committerAnatol Belski <ab@php.net>2016-12-22 14:56:47 +0100
commit758af77e9d1c3c6e5aea365bc0d35c385278ad5a (patch)
tree31a297b9da316030aaacb5ab4382f57ba3e46cca /win32/readdir.c
parentafb6ca2566691a673b7e638ffd7e3181e21d80a3 (diff)
downloadphp-git-758af77e9d1c3c6e5aea365bc0d35c385278ad5a.tar.gz
Path handling related refactorings
Primarily related to the path handling datatypes, to avoid unnecessary casts, where possible. Also some rework to avoid code dup. Probably more places are to go, even not path related, primarily to have less casts and unsigned integers where possible. That way, we've not only less warnings and casts, but are also safer with regard to the integer overflows. OFC it's not a panacea, but still significantly reduces the vulnerability potential.
Diffstat (limited to 'win32/readdir.c')
-rw-r--r--win32/readdir.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/win32/readdir.c b/win32/readdir.c
index 4a6d65932f..43d5deecfd 100644
--- a/win32/readdir.c
+++ b/win32/readdir.c
@@ -24,16 +24,6 @@
extern "C" {
#endif
-/* typedef DIR - not the same as Unix */
-struct DIR_W32 {
- HANDLE handle; /* _findfirst/_findnext handle */
- int offset; /* offset into directory */
- short finished; /* 1 if there are not more files */
- WIN32_FIND_DATAW fileinfo; /* from _findfirst/_findnext */
- wchar_t *dirw; /* the dir we are reading */
- struct dirent dent; /* the dirent to return */
-};
-
DIR *opendir(const char *dir)
{
DIR *dp;