From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8305535082583060728==" MIME-Version: 1.0 From: James Prestwood Subject: [PATCH 3/3] netdev: remove unneeded goto/return code Date: Mon, 29 Mar 2021 13:17:16 -0700 Message-ID: <20210329201716.716947-3-prestwoj@gmail.com> In-Reply-To: <20210329201716.716947-1-prestwoj@gmail.com> List-Id: To: iwd@lists.01.org --===============8305535082583060728== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable All possible paths led to the same result so it was simplified to remove two goto's and a return call. --- src/netdev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/netdev.c b/src/netdev.c index d5bad57e..2f35c11e 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -2234,12 +2234,7 @@ static void netdev_authenticate_event(struct l_genl_= msg *msg, return; else if (ret > 0) status_code =3D (uint16_t)ret; - - goto auth_error; - } else - goto auth_error; - - return; + } = auth_error: netdev_connect_failed(netdev, NETDEV_RESULT_AUTHENTICATION_FAILED, -- = 2.26.2 --===============8305535082583060728==--