diff options
author | Thomas Haller <thaller@redhat.com> | 2017-12-08 10:44:36 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-12-11 15:53:24 +0100 |
commit | 7b08331b9d333aaa33e8f025069eb05f80b15ed4 (patch) | |
tree | 006e291e068229ffa7d4a91c3aa5d931d59133e2 /clients/common/nm-client-utils.c | |
parent | 4a38e9338dd1bba68ff267d7716c6e8dd135c3d7 (diff) | |
download | NetworkManager-th/cli-strsplit.tar.gz |
cli: drop nmc_strsplit_set()th/cli-strsplit
In most cases, it copies the entire strv needlessly.
We can do better.
Also, the max_tokens argument is handled wrongly (albeit
not used anywhere anymore).
Diffstat (limited to 'clients/common/nm-client-utils.c')
-rw-r--r-- | clients/common/nm-client-utils.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/clients/common/nm-client-utils.c b/clients/common/nm-client-utils.c index 8a28db2dd5..398c94cf16 100644 --- a/clients/common/nm-client-utils.c +++ b/clients/common/nm-client-utils.c @@ -173,18 +173,6 @@ finish: return ret; } -/* - * Wrapper function for g_strsplit_set() that removes empty strings - * from the vector as they are not useful in most cases. - */ -char ** -nmc_strsplit_set (const char *str, const char *delimiter, int max_tokens) -{ - /* remove empty strings */ - return _nm_utils_strv_cleanup (g_strsplit_set (str, delimiter, max_tokens), - FALSE, TRUE, FALSE); -} - gboolean matches (const char *cmd, const char *pattern) { |