From: Nikos Mavrogiannopoulos Date: Thu, 12 Nov 2020 15:03:10 +0000 (+0100) Subject: decrypt_stoken: avoid code without side effects X-Git-Tag: v8.20~386^2~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d30a60939db17881fa6a1b24b5e9a57c354c95fb;p=users%2Fdwmw2%2Fopenconnect.git decrypt_stoken: avoid code without side effects Signed-off-by: Nikos Mavrogiannopoulos --- 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 */