all: use nm_g_array_first_p() instead of nm_g_array_index_p(,,0) where applicable

This commit is contained in:
Thomas Haller 2023-10-30 17:21:58 +01:00
parent 0554ef3808
commit 563a185135
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 3 additions and 3 deletions

View file

@ -355,7 +355,7 @@ _nm_setting_class_commit(NMSettingClass *setting_class,
guint k;
nm_assert(!_nm_sett_info_property_find_in_array(
nm_g_array_index_p(properties_override, NMSettInfoProperty, 0),
nm_g_array_first_p(properties_override, NMSettInfoProperty),
i,
p->name));
for (k = 0; k < n_property_specs; k++) {
@ -374,7 +374,7 @@ _nm_setting_class_commit(NMSettingClass *setting_class,
NMSettInfoProperty *p;
if (_nm_sett_info_property_find_in_array(
nm_g_array_index_p(properties_override, NMSettInfoProperty, 0),
nm_g_array_first_p(properties_override, NMSettInfoProperty),
override_len,
name))
continue;

View file

@ -552,7 +552,7 @@ nmt_8021x_fields_constructed(GObject *object)
entry.id = (char *) eap_method_descs[i].id;
g_array_append_val(entries, entry);
}
priv->authentication = nmt_newt_popup_new(nm_g_array_index_p(entries, NmtNewtPopupEntry, 0));
priv->authentication = nmt_newt_popup_new(nm_g_array_first_p(entries, NmtNewtPopupEntry));
nmt_editor_grid_append(grid, "Authentication", NMT_NEWT_WIDGET(priv->authentication), NULL);
widget = nmt_newt_stack_new();