david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[Settings] find_child_settings() accepts a NULL parent

This commit is contained in:
Michael Brown 2008-03-27 06:07:19 +00:00
parent 7a4e212fe2
commit af466aedf1
1 changed files with 4 additions and 0 deletions

View File

@ -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 );