mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 14:20:16 +01:00
glib-aux: add "const" to arguments of nm_strvarray_*() helpers
This commit is contained in:
parent
3f8431f069
commit
e48fc3ee3e
1 changed files with 3 additions and 3 deletions
|
|
@ -3021,7 +3021,7 @@ nm_strvarray_add(GArray *array, const char *str)
|
|||
}
|
||||
|
||||
static inline const char *
|
||||
nm_strvarray_get_idx(GArray *array, guint idx)
|
||||
nm_strvarray_get_idx(const GArray *array, guint idx)
|
||||
{
|
||||
return nm_g_array_index(array, const char *, idx);
|
||||
}
|
||||
|
|
@ -3103,14 +3103,14 @@ nm_strvarray_set_strv(GArray **array, const char *const *strv)
|
|||
}
|
||||
|
||||
static inline gssize
|
||||
nm_strvarray_find_first(GArray *strv, const char *needle)
|
||||
nm_strvarray_find_first(const GArray *strv, const char *needle)
|
||||
{
|
||||
guint i;
|
||||
|
||||
nm_assert(needle);
|
||||
|
||||
if (strv) {
|
||||
nm_assert(sizeof(char *) == g_array_get_element_size(strv));
|
||||
nm_assert(sizeof(char *) == g_array_get_element_size((GArray *) strv));
|
||||
for (i = 0; i < strv->len; i++) {
|
||||
if (nm_streq(needle, g_array_index(strv, const char *, i)))
|
||||
return i;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue