mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-24 04:00:27 +01:00
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:
parent
c6efbeccf3
commit
51255d8b64
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue