libnm: remove dead code in nm_team_setting_config_get()

I was aware that this code is not reachable. But for consistency, it
seems better to be explict about it (to avoid future bugs when refactoring).

Anyway, Coverity complains about it. So assert instead.

(cherry picked from commit 643bc4ca22)
This commit is contained in:
Thomas Haller 2019-08-02 17:45:49 +02:00
parent 9168dea0da
commit 3ebeb43c5f

View file

@ -1587,8 +1587,8 @@ nm_team_setting_config_get (const NMTeamSetting *self)
|| _team_setting_has_fields_any_v (self, attr_lst_runner_pt3, G_N_ELEMENTS (attr_lst_runner_pt3))) {
gboolean list_is_empty2 = TRUE;
if (!list_is_empty)
nm_json_aux_gstr_append_delimiter (gstr);
nm_assert (list_is_empty);
nm_json_aux_gstr_append_obj_name (gstr, "runner", '{');
if (_team_setting_fields_to_json_maybe (self, gstr, !list_is_empty2, attr_lst_runner_pt1, G_N_ELEMENTS (attr_lst_runner_pt1)))