From d30a60939db17881fa6a1b24b5e9a57c354c95fb Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 12 Nov 2020 16:03:10 +0100 Subject: [PATCH] decrypt_stoken: avoid code without side effects Signed-off-by: Nikos Mavrogiannopoulos --- stoken.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stoken.c b/stoken.c index 8340a670..d01dedd0 100644 --- a/stoken.c +++ b/stoken.c @@ -121,10 +121,8 @@ static int decrypt_stoken(struct openconnect_info *vpninfo) while (1) { nuke_opt_values(opts); - if (!opts[0].type) { - /* don't bug the user if there's nothing to enter */ - ret = 0; - } else { + /* don't bug the user if there's nothing to enter */ + if (opts[0].type) { int some_empty = 0, all_empty = 1; /* < 0 for error; 1 if cancelled */ -- 2.49.0