summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2018-07-12 22:39:00 +0200
committerNiels Möller <nisse@lysator.liu.se>2018-07-12 22:39:00 +0200
commit95798b5c3b0128359aaba107e2bda077459a8560 (patch)
tree2cdb0705131912ed7dd6069d83fdef36587425c7
parent0355cfad41931c5583e391bfcd2deb806a6d7f5e (diff)
downloadnettle-95798b5c3b0128359aaba107e2bda077459a8560.tar.gz
Fix handling of eratosthenes -q.
-rw-r--r--ChangeLog1
-rw-r--r--examples/eratosthenes.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0dbacaa0..23a0331a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
* examples/eratosthenes.c (main): Don't allocate bitmap storage
for limit == 2 (early exit), closing memory leak at exit.
+ (main): Fix handling of short -q option.
* eccdata.c (output_curve): Replace mpz_init_set_ui by mpz_set_ui,
to fix memory leak.
diff --git a/examples/eratosthenes.c b/examples/eratosthenes.c
index 415c6d25..71161820 100644
--- a/examples/eratosthenes.c
+++ b/examples/eratosthenes.c
@@ -262,7 +262,7 @@ main (int argc, char **argv)
{ NULL, 0, NULL, 0}
};
- while ( (c = getopt_long(argc, argv, "svb:", options, NULL)) != -1)
+ while ( (c = getopt_long(argc, argv, "svqb:", options, NULL)) != -1)
switch (c)
{
case OPT_HELP: