aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-wks-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpg-wks-server.c')
-rw-r--r--tools/gpg-wks-server.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c
index 0cfe47fba..937479260 100644
--- a/tools/gpg-wks-server.c
+++ b/tools/gpg-wks-server.c
@@ -1613,22 +1613,22 @@ static gpg_error_t
get_domain_list (strlist_t *r_list)
{
gpg_error_t err;
- DIR *dir = NULL;
+ gnupg_dir_t dir = NULL;
char *fname = NULL;
- struct dirent *dentry;
+ gnupg_dirent_t dentry;
struct stat sb;
strlist_t list = NULL;
*r_list = NULL;
- dir = opendir (opt.directory);
+ dir = gnupg_opendir (opt.directory);
if (!dir)
{
err = gpg_error_from_syserror ();
goto leave;
}
- while ((dentry = readdir (dir)))
+ while ((dentry = gnupg_readdir (dir)))
{
if (*dentry->d_name == '.')
continue;
@@ -1668,8 +1668,7 @@ get_domain_list (strlist_t *r_list)
leave:
free_strlist (list);
- if (dir)
- closedir (dir);
+ gnupg_closedir (dir);
xfree (fname);
return err;
}
@@ -1682,8 +1681,8 @@ expire_one_domain (const char *top_dirname, const char *domain)
gpg_error_t err;
char *dirname;
char *fname = NULL;
- DIR *dir = NULL;
- struct dirent *dentry;
+ gnupg_dir_t dir = NULL;
+ gnupg_dirent_t dentry;
struct stat sb;
time_t now = gnupg_get_time ();
@@ -1696,7 +1695,7 @@ expire_one_domain (const char *top_dirname, const char *domain)
goto leave;
}
- dir = opendir (dirname);
+ dir = gnupg_opendir (dirname);
if (!dir)
{
err = gpg_error_from_syserror ();
@@ -1705,7 +1704,7 @@ expire_one_domain (const char *top_dirname, const char *domain)
goto leave;
}
- while ((dentry = readdir (dir)))
+ while ((dentry = gnupg_readdir (dir)))
{
if (*dentry->d_name == '.')
continue;
@@ -1754,8 +1753,7 @@ expire_one_domain (const char *top_dirname, const char *domain)
err = 0;
leave:
- if (dir)
- closedir (dir);
+ gnupg_closedir (dir);
xfree (dirname);
xfree (fname);
return err;