mirror of
https://github.com/xcat2/xNBA.git
synced 2025-01-07 20:15:06 +00:00
[Settings] find_child_settings() accepts a NULL parent
This commit is contained in:
parent
7a4e212fe2
commit
af466aedf1
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user