diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-04-12 15:37:38 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-04-12 15:37:40 +0200 |
commit | 33239bf89e41771798cf2d49a3c5564806f5582c (patch) | |
tree | 8084e2e324705bf2bbdcf6742903571a526f4766 /lib | |
parent | 071912e070167ada794fbd9923d36def7e714d4a (diff) | |
download | gnutls-33239bf89e41771798cf2d49a3c5564806f5582c.tar.gz |
load_dir_certs: use readdir() in all platforms
According to glibc documentation readdir_r() is deprecated
and the use of readdir() is recommended. As such we switch to
it on all platforms.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/x509/verify-high2.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/x509/verify-high2.c b/lib/x509/verify-high2.c index 46a0db9f68..e79aedc72d 100644 --- a/lib/x509/verify-high2.c +++ b/lib/x509/verify-high2.c @@ -379,24 +379,16 @@ int load_dir_certs(const char *dirname, int ret; int r = 0; char path[GNUTLS_PATH_MAX]; -#ifndef _WIN32 - struct dirent e; -#endif dirp = opendir(dirname); if (dirp != NULL) { do { -#ifdef _WIN32 d = readdir(dirp); - if (d != NULL) { -#else - ret = readdir_r(dirp, &e, &d); - if (ret == 0 && d != NULL + if (d != NULL #ifdef _DIRENT_HAVE_D_TYPE && (d->d_type == DT_REG || d->d_type == DT_LNK || d->d_type == DT_UNKNOWN) #endif ) { -#endif snprintf(path, sizeof(path), "%s/%s", dirname, d->d_name); |