Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Settings] find_child_settings() accepts a NULL parent
  • Loading branch information
Michael Brown committed Mar 27, 2008
1 parent 7a4e212 commit af466ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/settings.c
Expand Up @@ -233,6 +233,10 @@ struct settings * find_child_settings ( struct settings *parent,
struct settings *settings;
size_t len;

/* NULL parent => add to settings root */
if ( parent == NULL )
parent = &settings_root;

/* Look for a child whose name matches the initial component */
list_for_each_entry ( settings, &parent->children, siblings ) {
len = strlen ( settings->name );
Expand Down

0 comments on commit af466ae

Please sign in to comment.