replace deprecated readdir_r() with readdir()
[citadel.git] / citadel / modules / image / serv_image.c
index 367814e9f699177b060f80d475a21af4375d3c8d..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
@@ -297,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;