replace deprecated readdir_r() with readdir()
[citadel.git] / citadel / modules / image / serv_image.c
index a33143f574b3ad2c69afb35bad3dcfe6e9478eed..a7960b10097ebb0697e8c350baa62d1dbb573856 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2017 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 #include "ctdl_module.h"
 #include "config.h"
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
 
 
-
 /*
  * DownLoad Room Image (see its icon or whatever)
  * If this command succeeds, it follows the same protocol as the DLAT command.
@@ -299,8 +297,7 @@ void import_old_userpic_files(void)
                free(d);
                return;
        }
-       while ((readdir_r(filedir, d, &filedir_entry) == 0) &&
-              (filedir_entry != NULL))
+       while ( (filedir_entry = readdir(filedir)) , (filedir_entry != NULL))
        {
 #ifdef _DIRENT_HAVE_D_NAMLEN
                d_namelen = filedir_entry->d_namlen;