Browse Source

[settings] Treat an empty formatted value as meaning "delete setting"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
5ad445fd0b
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/core/settings.c

+ 2
- 2
src/core/settings.c View File

1052
 	int check_len;
1052
 	int check_len;
1053
 	int rc;
1053
 	int rc;
1054
 
1054
 
1055
-	/* NULL value implies deletion */
1056
-	if ( ! value )
1055
+	/* NULL value or empty string implies deletion */
1056
+	if ( ( ! value ) || ( ! value[0] ) )
1057
 		return delete_setting ( settings, setting );
1057
 		return delete_setting ( settings, setting );
1058
 
1058
 
1059
 	/* Parse formatted value */
1059
 	/* Parse formatted value */

Loading…
Cancel
Save