]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove unnecessary if condition from apps.c
authorAashil Patel <aashilpatel1993@gmail.com>
Thu, 1 Jun 2017 00:05:14 +0000 (20:05 -0400)
committerRich Salz <rsalz@openssl.org>
Thu, 1 Jun 2017 20:28:31 +0000 (16:28 -0400)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3596)

apps/apps.c

index c66b89cff4a7f7c57bce0ff593cca58c5e295a49..1a1b7ec309d9213c4ee64db585f0a60fdf070d6a 100644 (file)
@@ -301,9 +301,9 @@ int password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA *cb_tmp)
         /* We know that there is no previous user data to return to us */
         (void)UI_add_user_data(ui, cb_data);
 
-        if (ok >= 0)
-            ok = UI_add_input_string(ui, prompt, ui_flags, buf,
-                                     PW_MIN_LENGTH, bufsiz - 1);
+        ok = UI_add_input_string(ui, prompt, ui_flags, buf,
+                                 PW_MIN_LENGTH, bufsiz - 1);
+
         if (ok >= 0 && verify) {
             buff = app_malloc(bufsiz, "password buffer");
             ok = UI_add_verify_string(ui, prompt, ui_flags, buff,