Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[settings] Allow store_setting() to access the root settings block
  • Loading branch information
Michael Brown committed Feb 17, 2009
1 parent 5484003 commit bea828b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/settings.c
Expand Up @@ -284,7 +284,7 @@ struct settings * find_settings ( const char *name ) {
/**
* Store value of setting
*
* @v settings Settings block
* @v settings Settings block, or NULL
* @v setting Setting to store
* @v data Setting data, or NULL to clear setting
* @v len Length of setting data
Expand All @@ -294,9 +294,9 @@ int store_setting ( struct settings *settings, struct setting *setting,
const void *data, size_t len ) {
int rc;

/* Sanity check */
/* NULL settings implies storing into the global settings root */
if ( ! settings )
return -ENODEV;
settings = &settings_root;

/* Store setting */
if ( ( rc = settings->op->store ( settings, setting,
Expand Down

0 comments on commit bea828b

Please sign in to comment.