From: Michael Brown Date: Thu, 27 Mar 2008 06:07:19 +0000 (+0000) Subject: [Settings] find_child_settings() accepts a NULL parent X-Git-Tag: v0.9.4~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af466aedf128ba6f1d81cfb9e32b1177063a16ef;p=thirdparty%2Fipxe.git [Settings] find_child_settings() accepts a NULL parent --- diff --git a/src/core/settings.c b/src/core/settings.c index b793ae687..e7001d680 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -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 );