From e001424ae280ac71d23f5ca40787a190fd35f612 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 2 Aug 2019 09:19:03 +0200 Subject: [PATCH] libnm/keyfile: silence "Identical code for different branches" complaint in _read_setting_wireguard_peer() That both branches of the "if" do the same, looks suspicious to Coverity. Work around it by not doing it. --- libnm-core/nm-keyfile.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libnm-core/nm-keyfile.c b/libnm-core/nm-keyfile.c index 85a9ea11c..b0c7a1347 100644 --- a/libnm-core/nm-keyfile.c +++ b/libnm-core/nm-keyfile.c @@ -3394,10 +3394,9 @@ _read_setting_wireguard_peer (KeyfileReaderInfo *info) return; if (!nm_wireguard_peer_is_valid (peer, TRUE, TRUE, &error)) { - if (!handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN, - _("peer '%s' is invalid: %s"), - info->group, error->message)) - return; + handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN, + _("peer '%s' is invalid: %s"), + info->group, error->message); return; }