ifcfg-rh: fix svSetValue() to properly handle empty variables

svSetValue() called svGetValue() which would return %NULL
for empty variables. That is wrong, because it caused svSetValue()
to add the variable anew.
This commit is contained in:
Thomas Haller
2015-05-20 14:02:02 +02:00
parent c6efbeccf3
commit 51255d8b64

View File

@@ -382,7 +382,7 @@ svSetValue (shvarFile *s, const char *key, const char *value, gboolean verbatim)
newval = value;
else
newval = svEscape (value, &newval_free);
oldval = svGetValue (s, key, FALSE);
oldval = svGetValueFull (s, key, FALSE);
if (!newval || !newval[0]) {
/* delete value */