Skip to content

Commit

Permalink
[settings] Treat an empty formatted value as meaning "delete setting"
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Oct 15, 2012
1 parent 1c2b6d2 commit 5ad445f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/settings.c
Expand Up @@ -1052,8 +1052,8 @@ int storef_setting ( struct settings *settings, struct setting *setting,
int check_len;
int rc;

/* NULL value implies deletion */
if ( ! value )
/* NULL value or empty string implies deletion */
if ( ( ! value ) || ( ! value[0] ) )
return delete_setting ( settings, setting );

/* Parse formatted value */
Expand Down

0 comments on commit 5ad445f

Please sign in to comment.