]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(main): With no command line arguments. exit after dislaying usage
authorNiels Möller <nisse@lysator.liu.se>
Fri, 9 Apr 2010 13:52:51 +0000 (15:52 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 9 Apr 2010 13:52:51 +0000 (15:52 +0200)
message.

Rev: nettle/examples/next-prime.c:1.4

examples/next-prime.c

index 584835f4cdb02c77219b4a6911bb6110e00fffa0..5283eccd4de0fc1ac7865a9a1876a6b602a62014 100644 (file)
@@ -61,7 +61,7 @@ main(int argc, char **argv)
   clock_t start;
   clock_t end;
   
-  enum { OPT_FACTORIAL = -100, OPT_RANDOM };
+  enum { OPT_FACTORIAL = -100 };
   static const struct option options[] =
     {
       /* Name, args, flag, val */
@@ -101,7 +101,10 @@ main(int argc, char **argv)
   argv += optind;
 
   if (argc != 1)
-    usage();
+    {
+      usage();
+      return EXIT_FAILURE;
+    }
 
   mpz_init(n);