mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-13 00:00:34 +01:00
cli: return early when splitting with %VALUE_STRSPLIT_MODE_STRIPPED
The reminder of the function only does (something akin to) g_strstrip().
As we split the strings are spaces to begin with, there is nothing to
strip and we can return right away.
(cherry picked from commit b74d9a0bd5)
This commit is contained in:
parent
55a46f91e5
commit
53b3e3d709
1 changed files with 2 additions and 1 deletions
|
|
@ -201,7 +201,8 @@ _value_strsplit (const char *value,
|
|||
switch (split_mode) {
|
||||
case VALUE_STRSPLIT_MODE_STRIPPED:
|
||||
strv = nm_utils_strsplit_set (value, NM_ASCII_SPACES",");
|
||||
break;
|
||||
NM_SET_OUT (out_len, NM_PTRARRAY_LEN (strv));
|
||||
return g_steal_pointer (&strv);
|
||||
case VALUE_STRSPLIT_MODE_OBJLIST:
|
||||
strv = nm_utils_strsplit_set (value, ",");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue