mirror of https://github.com/ipxe/ipxe.git
[Settings] find_child_settings() accepts a NULL parent
parent
7a4e212fe2
commit
af466aedf1
|
@ -233,6 +233,10 @@ struct settings * find_child_settings ( struct settings *parent,
|
||||||
struct settings *settings;
|
struct settings *settings;
|
||||||
size_t len;
|
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 */
|
/* Look for a child whose name matches the initial component */
|
||||||
list_for_each_entry ( settings, &parent->children, siblings ) {
|
list_for_each_entry ( settings, &parent->children, siblings ) {
|
||||||
len = strlen ( settings->name );
|
len = strlen ( settings->name );
|
||||||
|
|
Loading…
Reference in New Issue