From 1c9790e6f5ca26fb1b690b81deb7931726941c09 Mon Sep 17 00:00:00 2001 From: Jaak Ristioja Date: Sun, 18 Dec 2016 09:45:47 -0500 Subject: [PATCH] * w32/*/dirent.*: [SV 49111] Remove unused telldir() --- w32/compat/dirent.c | 20 +------------------- w32/include/dirent.h | 1 - 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/w32/compat/dirent.c b/w32/compat/dirent.c index 17f7d5fd..8675b096 100644 --- a/w32/compat/dirent.c +++ b/w32/compat/dirent.c @@ -128,7 +128,7 @@ readdir(DIR* pDir) } else if (!FindNextFile(pDir->dir_hDirHandle, &wfdFindData)) return NULL; - /* bump count for next call to readdir() or telldir() */ + /* bump count for next call to readdir() */ pDir->dir_nNumFiles++; /* fill in struct dirent values */ @@ -164,24 +164,6 @@ rewinddir(DIR* pDir) return; } -int -telldir(DIR* pDir) -{ - if (!pDir) { - errno = EINVAL; - return -1; - } - - /* sanity check that this is a DIR pointer */ - if (pDir->dir_ulCookie != __DIRENT_COOKIE) { - errno = EINVAL; - return -1; - } - - /* return number of times readdir() called */ - return pDir->dir_nNumFiles; -} - void seekdir(DIR* pDir, long nPosition) { diff --git a/w32/include/dirent.h b/w32/include/dirent.h index bae8449e..a34fabfb 100644 --- a/w32/include/dirent.h +++ b/w32/include/dirent.h @@ -52,7 +52,6 @@ DIR *opendir(const char *); struct dirent *readdir(DIR *); void rewinddir(DIR *); void closedir(DIR *); -int telldir(DIR *); void seekdir(DIR *, long); #endif /* !__MINGW32__ */