summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMichael Brown2008-03-27 07:07:19 +0100
committerMichael Brown2008-03-27 07:07:19 +0100
commitaf466aedf128ba6f1d81cfb9e32b1177063a16ef (patch)
treed835b8e841cd1490497afc3d421e89b070afcbc9 /src/core
parent[DHCP] Treat empty fields in DHCP packets as non-existent. (diff)
downloadipxe-af466aedf128ba6f1d81cfb9e32b1177063a16ef.tar.gz
ipxe-af466aedf128ba6f1d81cfb9e32b1177063a16ef.tar.xz
ipxe-af466aedf128ba6f1d81cfb9e32b1177063a16ef.zip
[Settings] find_child_settings() accepts a NULL parent
Diffstat (limited to 'src/core')
-rw-r--r--src/core/settings.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/settings.c b/src/core/settings.c
index b793ae68..e7001d68 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 );