1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-09-20 14:51:42 +02:00

gpg: Fix command line parsing of --quick-addkey and --quick-gen-key.

* g10/gpg.c (main): Compose a block by curly braces.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2016-06-07 14:16:32 +09:00
parent 7257ea2d45
commit abeeb84a94

View File

@ -4121,9 +4121,11 @@ main (int argc, char **argv)
{ {
x_usage = *argv++; argc--; x_usage = *argv++; argc--;
if (argc) if (argc)
{
x_expire = *argv++; argc--; x_expire = *argv++; argc--;
} }
} }
}
quick_generate_keypair (ctrl, username, x_algo, x_usage, x_expire); quick_generate_keypair (ctrl, username, x_algo, x_usage, x_expire);
xfree (username); xfree (username);
} }
@ -4195,9 +4197,11 @@ main (int argc, char **argv)
{ {
x_usage = *argv++; argc--; x_usage = *argv++; argc--;
if (argc) if (argc)
{
x_expire = *argv++; argc--; x_expire = *argv++; argc--;
} }
} }
}
keyedit_quick_addkey (ctrl, x_fpr, x_algo, x_usage, x_expire); keyedit_quick_addkey (ctrl, x_fpr, x_algo, x_usage, x_expire);
} }
break; break;