diff options
author | Werner Koch <wk@gnupg.org> | 2015-11-27 17:12:56 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-11-27 17:12:56 +0100 |
commit | 100f34e869df899a695f5e5ef1b8e092baf91751 (patch) | |
tree | 656e0923bfe5d73d5e2ceaf4099527e038ccf560 /tools/gpgtar.c | |
parent | dirmngr: Avoid casting away a const from an char**. (diff) | |
download | gnupg2-100f34e869df899a695f5e5ef1b8e092baf91751.tar.xz gnupg2-100f34e869df899a695f5e5ef1b8e092baf91751.zip |
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>
Diffstat (limited to 'tools/gpgtar.c')
-rw-r--r-- | tools/gpgtar.c | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/tools/gpgtar.c b/tools/gpgtar.c index a46a3398c..a09d2f004 100644 --- a/tools/gpgtar.c +++ b/tools/gpgtar.c @@ -347,38 +347,42 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts) case oCMS: /* Dummy option for now. */ break; case oGpgArgs:; - strlist_t list; - if (shell_parse_stringlist (pargs->r.ret_str, &list)) - log_error ("failed to parse gpg arguments '%s'\n", - pargs->r.ret_str); - else - { - if (opt.gpg_arguments) - strlist_last (opt.gpg_arguments)->next = list; - else - opt.gpg_arguments = list; - } + { + strlist_t list; + if (shell_parse_stringlist (pargs->r.ret_str, &list)) + log_error ("failed to parse gpg arguments '%s'\n", + pargs->r.ret_str); + else + { + if (opt.gpg_arguments) + strlist_last (opt.gpg_arguments)->next = list; + else + opt.gpg_arguments = list; + } + } break; case oTarArgs:; - int tar_argc; - char **tar_argv; - - if (shell_parse_argv (pargs->r.ret_str, &tar_argc, &tar_argv)) - log_error ("failed to parse tar arguments '%s'\n", - pargs->r.ret_str); - else - { - ARGPARSE_ARGS tar_args; - tar_args.argc = &tar_argc; - tar_args.argv = &tar_argv; - tar_args.flags = ARGPARSE_FLAG_ARG0; - parse_arguments (&tar_args, tar_opts); - if (tar_args.err) - log_error ("unsupported tar arguments '%s'\n", - pargs->r.ret_str); - pargs->err = tar_args.err; - } + { + int tar_argc; + char **tar_argv; + + if (shell_parse_argv (pargs->r.ret_str, &tar_argc, &tar_argv)) + log_error ("failed to parse tar arguments '%s'\n", + pargs->r.ret_str); + else + { + ARGPARSE_ARGS tar_args; + tar_args.argc = &tar_argc; + tar_args.argv = &tar_argv; + tar_args.flags = ARGPARSE_FLAG_ARG0; + parse_arguments (&tar_args, tar_opts); + if (tar_args.err) + log_error ("unsupported tar arguments '%s'\n", + pargs->r.ret_str); + pargs->err = tar_args.err; + } + } break; case oDryRun: |