mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 03:48:09 +02: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 *
|
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);
|
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
|
static inline gssize
|
||||||
nm_strvarray_find_first(GArray *strv, const char *needle)
|
nm_strvarray_find_first(const GArray *strv, const char *needle)
|
||||||
{
|
{
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
nm_assert(needle);
|
nm_assert(needle);
|
||||||
|
|
||||||
if (strv) {
|
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++) {
|
for (i = 0; i < strv->len; i++) {
|
||||||
if (nm_streq(needle, g_array_index(strv, const char *, i)))
|
if (nm_streq(needle, g_array_index(strv, const char *, i)))
|
||||||
return i;
|
return i;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue