Commit a0a07be9 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Avoid explicit iterator

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent eb5c7079
...@@ -181,20 +181,18 @@ zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager) ...@@ -181,20 +181,18 @@ zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
return; return;
} }
GIRARA_LIST_FOREACH_BODY_WITH_ITER(plugin_manager->path, char*, iter, plugindir, GIRARA_LIST_FOREACH_BODY(plugin_manager->path, char*, plugindir,
/* read all files in the plugin directory */ /* read all files in the plugin directory */
GDir* dir = g_dir_open(plugindir, 0, NULL); GDir* dir = g_dir_open(plugindir, 0, NULL);
if (dir == NULL) { if (dir == NULL) {
girara_error("could not open plugin directory: %s", plugindir); girara_error("could not open plugin directory: %s", plugindir);
girara_list_iterator_next(iter); } else {
continue; const char* name = NULL;
} while ((name = g_dir_read_name(dir)) != NULL) {
load_plugin(plugin_manager, plugindir, name);
const char* name = NULL; }
while ((name = g_dir_read_name(dir)) != NULL) { g_dir_close(dir);
load_plugin(plugin_manager, plugindir, name);
} }
g_dir_close(dir);
); );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment