mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 10:18:03 +02:00
libnm-core/utils: allow using the same character for key/value and attribute separators
Allows doing a nm_utils_parse_variant_attributes(..., ' ', ' ').
(cherry picked from commit 48a619e62b)
This commit is contained in:
parent
faa6ddc272
commit
51d5b97bd7
1 changed files with 4 additions and 0 deletions
|
|
@ -5483,6 +5483,10 @@ nm_utils_parse_variant_attributes (const char *string,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* The attribute and key/value separators are the same. Look for the next one. */
|
||||
if (ptr == sep)
|
||||
goto next;
|
||||
|
||||
name = attribute_unescape (start, sep);
|
||||
value = attribute_unescape (sep + 1, ptr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue