libnm: drop unused nm_strv_to_ptrarray() helper
It also doesn't make much sense to have this. We may use a GPtrArray to construct and keep track of a (dynamic) strv list. Then we add the strings to the GPtrArray one by one. We almost never will want to create a GPtrArray based on a strv array.
This commit is contained in:
@@ -897,24 +897,6 @@ _nm_utils_slist_to_strv(const GSList *slist, gboolean deep_copy)
|
|||||||
return strv;
|
return strv;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPtrArray *
|
|
||||||
nm_strv_to_ptrarray(char **strv)
|
|
||||||
{
|
|
||||||
GPtrArray *ptrarray;
|
|
||||||
gsize i, l;
|
|
||||||
|
|
||||||
l = NM_PTRARRAY_LEN(strv);
|
|
||||||
|
|
||||||
ptrarray = g_ptr_array_new_full(l, g_free);
|
|
||||||
|
|
||||||
if (strv) {
|
|
||||||
for (i = 0; strv[i]; i++)
|
|
||||||
g_ptr_array_add(ptrarray, g_strdup(strv[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
return ptrarray;
|
|
||||||
}
|
|
||||||
|
|
||||||
char **
|
char **
|
||||||
_nm_utils_ptrarray_to_strv(const GPtrArray *ptrarray)
|
_nm_utils_ptrarray_to_strv(const GPtrArray *ptrarray)
|
||||||
{
|
{
|
||||||
|
@@ -347,7 +347,6 @@ GPtrArray *_nm_utils_copy_object_array(const GPtrArray *array);
|
|||||||
GSList *nm_strv_to_gslist(char **strv, gboolean deep_copy);
|
GSList *nm_strv_to_gslist(char **strv, gboolean deep_copy);
|
||||||
char **_nm_utils_slist_to_strv(const GSList *slist, gboolean deep_copy);
|
char **_nm_utils_slist_to_strv(const GSList *slist, gboolean deep_copy);
|
||||||
|
|
||||||
GPtrArray *nm_strv_to_ptrarray(char **strv);
|
|
||||||
char **_nm_utils_ptrarray_to_strv(const GPtrArray *ptrarray);
|
char **_nm_utils_ptrarray_to_strv(const GPtrArray *ptrarray);
|
||||||
|
|
||||||
gboolean _nm_utils_check_file(const char *filename,
|
gboolean _nm_utils_check_file(const char *filename,
|
||||||
|
Reference in New Issue
Block a user