1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

dirmngr: Avoid a declarations after statements.

* tools/gpgtar.c (parse_arguments): Use a block for a local varibale
definition.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-11-27 17:12:56 +01:00
parent 6501741d2c
commit 100f34e869
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -347,38 +347,42 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts)
case oCMS: /* Dummy option for now. */ break; case oCMS: /* Dummy option for now. */ break;
case oGpgArgs:; case oGpgArgs:;
strlist_t list; {
if (shell_parse_stringlist (pargs->r.ret_str, &list)) strlist_t list;
log_error ("failed to parse gpg arguments '%s'\n", if (shell_parse_stringlist (pargs->r.ret_str, &list))
pargs->r.ret_str); log_error ("failed to parse gpg arguments '%s'\n",
else pargs->r.ret_str);
{ else
if (opt.gpg_arguments) {
strlist_last (opt.gpg_arguments)->next = list; if (opt.gpg_arguments)
else strlist_last (opt.gpg_arguments)->next = list;
opt.gpg_arguments = list; else
} opt.gpg_arguments = list;
}
}
break; break;
case oTarArgs:; case oTarArgs:;
int tar_argc; {
char **tar_argv; int tar_argc;
char **tar_argv;
if (shell_parse_argv (pargs->r.ret_str, &tar_argc, &tar_argv)) if (shell_parse_argv (pargs->r.ret_str, &tar_argc, &tar_argv))
log_error ("failed to parse tar arguments '%s'\n", log_error ("failed to parse tar arguments '%s'\n",
pargs->r.ret_str); pargs->r.ret_str);
else else
{ {
ARGPARSE_ARGS tar_args; ARGPARSE_ARGS tar_args;
tar_args.argc = &tar_argc; tar_args.argc = &tar_argc;
tar_args.argv = &tar_argv; tar_args.argv = &tar_argv;
tar_args.flags = ARGPARSE_FLAG_ARG0; tar_args.flags = ARGPARSE_FLAG_ARG0;
parse_arguments (&tar_args, tar_opts); parse_arguments (&tar_args, tar_opts);
if (tar_args.err) if (tar_args.err)
log_error ("unsupported tar arguments '%s'\n", log_error ("unsupported tar arguments '%s'\n",
pargs->r.ret_str); pargs->r.ret_str);
pargs->err = tar_args.err; pargs->err = tar_args.err;
} }
}
break; break;
case oDryRun: case oDryRun: