summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/settings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/settings.c b/src/core/settings.c
index 5e16b27d0..85d95e6eb 100644
--- a/src/core/settings.c
+++ b/src/core/settings.c
@@ -499,10 +499,10 @@ int register_settings ( struct settings *settings, struct settings *parent,
*/
void unregister_settings ( struct settings *settings ) {
struct settings *child;
- struct settings *tmp;
/* Unregister child settings */
- list_for_each_entry_safe ( child, tmp, &settings->children, siblings ) {
+ while ( ( child = list_first_entry ( &settings->children,
+ struct settings, siblings ) ) ) {
unregister_settings ( child );
}