mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 00:58:00 +02:00
cli: don't explicitly unset out_to_free argument in NMMetaType.get_nested()
The virtual function NMMetaType.get_nested() has only one caller: nm_meta_abstract_info_get_nested(). That caller makes sure to always pass in an @out_to_free argument, and that it is initialized to NULL.
This commit is contained in:
parent
07ea00074b
commit
41810aad48
3 changed files with 2 additions and 4 deletions
|
|
@ -62,7 +62,6 @@ _meta_type_nmc_generic_info_get_nested (const NMMetaAbstractInfo *abstract_info,
|
|||
|
||||
info = (const NmcMetaGenericInfo *) abstract_info;
|
||||
|
||||
*out_to_free = NULL;
|
||||
NM_SET_OUT (out_len, NM_PTRARRAY_LEN (info->nested));
|
||||
return (const NMMetaAbstractInfo *const*) info->nested;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,7 +213,8 @@ nm_meta_abstract_info_get_nested (const NMMetaAbstractInfo *abstract_info,
|
|||
|
||||
if (abstract_info->meta_type->get_nested) {
|
||||
nested = abstract_info->meta_type->get_nested (abstract_info, &l, &f);
|
||||
nm_assert ((nested ? g_strv_length ((char **) nested) : 0) == l);
|
||||
nm_assert (NM_PTRARRAY_LEN (nested) == l);
|
||||
nm_assert (!f || nested == f);
|
||||
if (nested && nested[0]) {
|
||||
NM_SET_OUT (out_len, l);
|
||||
*nested_to_free = g_steal_pointer (&f);
|
||||
|
|
|
|||
|
|
@ -8186,7 +8186,6 @@ _meta_type_setting_info_editor_get_nested (const NMMetaAbstractInfo *abstract_in
|
|||
info = (const NMMetaSettingInfoEditor *) abstract_info;
|
||||
|
||||
NM_SET_OUT (out_len, info->properties_num);
|
||||
*out_to_free = NULL;
|
||||
return (const NMMetaAbstractInfo *const*) info->properties;
|
||||
}
|
||||
|
||||
|
|
@ -8196,7 +8195,6 @@ _meta_type_property_info_get_nested (const NMMetaAbstractInfo *abstract_info,
|
|||
gpointer *out_to_free)
|
||||
{
|
||||
NM_SET_OUT (out_len, 0);
|
||||
*out_to_free = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue