diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-29 16:13:11 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-29 16:26:28 +0100 |
commit | 15608713c4a8e4eeea0d5418247f133760fb9a8e (patch) | |
tree | 0c9090aa6600d28f9b6ffda99a832e8d19dda92e | |
parent | a81ad3474d76c70e4a162f1f619907b42fe247c6 (diff) | |
download | NetworkManager-15608713c4a8e4eeea0d5418247f133760fb9a8e.tar.gz |
libnm: drop now unused helper function _nm_utils_strsplit_set()
-rw-r--r-- | libnm-core/nm-core-internal.h | 4 | ||||
-rw-r--r-- | libnm-core/nm-utils.c | 35 |
2 files changed, 0 insertions, 39 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index de39deabd9..8f4e110eb6 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -244,10 +244,6 @@ gssize _nm_utils_ptrarray_find_first (gconstpointer *list, gssize len, gconstpoi gssize _nm_utils_ptrarray_find_binary_search (gconstpointer *list, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data); gssize _nm_utils_array_find_binary_search (gconstpointer list, gsize elem_size, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data); -char ** _nm_utils_strsplit_set (const char *str, - const char *delimiters, - int max_tokens); - GSList * _nm_utils_strv_to_slist (char **strv, gboolean deep_copy); char ** _nm_utils_slist_to_strv (GSList *slist, gboolean deep_copy); diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 69c8b66cd0..bb91f93733 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -846,41 +846,6 @@ _nm_utils_strv_equal (char **strv1, char **strv2) return !*strv1 && !*strv2; } -/** - * _nm_utils_strsplit_set: - * @str: string to split - * @delimiters: string of delimiter characters - * @max_tokens: the maximum number of tokens to split string into. When it is - * less than 1, the @str is split completely. - * - * Utility function for splitting string into a string array. It is a wrapper - * for g_strsplit_set(), but it also removes empty strings from the vector as - * they are not useful in most cases. - * - * Returns: (transfer full): a newly allocated NULL-terminated array of strings. - * The caller must free the returned array with g_strfreev(). - **/ -char ** -_nm_utils_strsplit_set (const char *str, const char *delimiters, int max_tokens) -{ - char **result; - uint i; - uint j; - - result = g_strsplit_set (str, delimiters, max_tokens); - - /* remove empty strings */ - for (i = 0; result && result[i]; i++) { - if (*result[i] == '\0') { - g_free (result[i]); - for (j = i; result[j]; j++) - result[j] = result[j + 1]; - i--; - } - } - return result; -} - static gboolean device_supports_ap_ciphers (guint32 dev_caps, guint32 ap_flags, |