shared: fix invalid assertion in nm_utils_team_link_watcher_from_string()

Fixes: a473ab431a ('cli: refactor team-link-watcher to/from strings')
This commit is contained in:
Thomas Haller 2019-05-14 11:17:43 +02:00
parent 61b1d1e963
commit 9e544d527a

View file

@ -348,12 +348,12 @@ nm_utils_team_link_watcher_from_string (const char *str,
}
#if NM_MORE_ASSERTS > 5
{
if (watcher) {
gs_free char *str2 = NULL;
nm_auto_unref_team_link_watcher NMTeamLinkWatcher *watcher2 = NULL;
static _nm_thread_local int recursive;
nm_assert (watcher);
nm_assert (!error || !*error);
if (recursive == 0) {
recursive = 1;
str2 = nm_utils_team_link_watcher_to_string (watcher);
@ -365,7 +365,8 @@ nm_utils_team_link_watcher_from_string (const char *str,
nm_assert (recursive == 1);
recursive = 0;
}
}
} else
nm_assert (!error || *error);
#endif
return watcher;