mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 00:50:16 +01:00
l3cfg: gracefully accept %NULL argument in nm_l3_config_data_lookup_objs()
This way we can safely iterate over a %NULL instance with nm_l3_config_data_iter_obj_for_each(). This avoids a NULL check, which in this case seems more annoying than helpful.
This commit is contained in:
parent
6358d10688
commit
d16776b5fd
1 changed files with 2 additions and 0 deletions
|
|
@ -583,6 +583,8 @@ nm_l3_config_data_lookup_index (const NML3ConfigData *self, NMPObjectType obj_ty
|
|||
const NMDedupMultiHeadEntry *
|
||||
nm_l3_config_data_lookup_objs (const NML3ConfigData *self, NMPObjectType obj_type)
|
||||
{
|
||||
if (!self)
|
||||
return NULL;
|
||||
return nm_dedup_multi_index_lookup_head (self->multi_idx,
|
||||
nm_l3_config_data_lookup_index (self, obj_type),
|
||||
NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue