]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
decrypt_stoken: avoid code without side effects
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 12 Nov 2020 15:03:10 +0000 (16:03 +0100)
committerNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Tue, 17 Nov 2020 12:53:13 +0000 (13:53 +0100)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
stoken.c

index 8340a670078a6d5e7f44576fc22a84b3a7784865..d01dedd0cc74fc7237e3e2f2467ecb5418b77a2d 100644 (file)
--- 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 */