Move -M handling code to match upstream.

This commit is contained in:
Darren Tucker 2016-09-12 13:30:50 +10:00
parent 7b63cf6dbb
commit d8c3cfbb01
1 changed files with 6 additions and 5 deletions

View File

@ -2455,11 +2455,6 @@ main(int argc, char **argv)
fatal("Desired generator has bad value: %s (%s)",
optarg, errstr);
break;
case 'M':
memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr);
if (errstr)
fatal("Memory limit is %s: %s", errstr, optarg);
break;
case 'G':
do_gen_candidates = 1;
if (strlcpy(out_file, optarg, sizeof(out_file)) >=
@ -2483,6 +2478,12 @@ main(int argc, char **argv)
fatal("Checkpoint filename too long");
checkpoint = xstrdup(optarg);
break;
case 'M':
memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX,
&errstr);
if (errstr)
fatal("Memory limit is %s: %s", errstr, optarg);
break;
case 'S':
/* XXX - also compare length against bits */
if (BN_hex2bn(&start, optarg) == 0)