HTTP client: Fix cleanup of TLS BIO via 'bio_update_fn' callback function
[openssl.git] / apps / prime.c
index e269493d5cd7b0df8f7d425fe6a4d3e9e3e3217a..190254d90e4c386adbd960030c68bf981680afd7 100644 (file)
@@ -83,12 +83,12 @@ opthelp:
     }
 
     /* Optional arguments are numbers to check. */
+    if (generate && !opt_check_rest_arg(NULL))
+        goto opthelp;
     argc = opt_num_rest();
     argv = opt_rest();
-    if (generate) {
-        if (argc != 0)
-            goto opthelp;
-    } else if (argc == 0) {
+    if (!generate && argc == 0) {
+        BIO_printf(bio_err, "Missing number (s) to check\n");
         goto opthelp;
     }