diff options
author | Michael Brown | 2008-03-22 01:40:33 +0100 |
---|---|---|
committer | Michael Brown | 2008-03-22 01:40:33 +0100 |
commit | 65c0974d1f52a4a655c069cf65876838f6973ccf (patch) | |
tree | dda514fc9fd522b20916d50948f702b66d306ab0 /src/core/settings.c | |
parent | [Settings] Implement simple_settings backed with extensible DHCP options (diff) | |
download | ipxe-65c0974d1f52a4a655c069cf65876838f6973ccf.tar.gz ipxe-65c0974d1f52a4a655c069cf65876838f6973ccf.tar.xz ipxe-65c0974d1f52a4a655c069cf65876838f6973ccf.zip |
[Settings] Bugfix: store_setting() now applies changes even on root block
Diffstat (limited to 'src/core/settings.c')
-rw-r--r-- | src/core/settings.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/settings.c b/src/core/settings.c index eb54ad73..49594dca 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -299,7 +299,6 @@ struct settings * find_settings ( const char *name ) { */ int store_setting ( struct settings *settings, unsigned int tag, const void *data, size_t len ) { - struct settings *parent; int rc; /* Sanity check */ @@ -317,8 +316,8 @@ int store_setting ( struct settings *settings, unsigned int tag, /* If these settings are registered, apply potentially-updated * settings */ - for ( parent = settings->parent ; parent ; parent = parent->parent ) { - if ( parent == &settings_root ) { + for ( ; settings ; settings = settings->parent ) { + if ( settings == &settings_root ) { if ( ( rc = apply_settings() ) != 0 ) return rc; break; |