libnm-core/utils: allow using the same character for key/value and attribute separators
Allows doing a nm_utils_parse_variant_attributes(..., ' ', ' ').
This commit is contained in:
@@ -5444,6 +5444,10 @@ nm_utils_parse_variant_attributes (const char *string,
|
|||||||
return NULL;
|
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);
|
name = attribute_unescape (start, sep);
|
||||||
value = attribute_unescape (sep + 1, ptr);
|
value = attribute_unescape (sep + 1, ptr);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user