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:
Thomas Haller 2018-05-03 10:10:07 +02:00
parent 07ea00074b
commit 41810aad48
3 changed files with 2 additions and 4 deletions

View file

@ -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;
}

View file

@ -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);

View file

@ -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;
}