mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-02 07:17:57 +02: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.
(cherry picked from commit 51255d8b64)
This commit is contained in:
parent
5ad85e17db
commit
7a98e481d9
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