From 1bd8392cc848ea3b5c44eed7f2030acd2aafb4b1 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan.bosch@open-xchange.com> Date: Wed, 23 Jun 2021 02:40:36 +0200 Subject: [PATCH] sieve-tools: Reformat sieve-dump.c --- src/sieve-tools/sieve-dump.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/sieve-tools/sieve-dump.c b/src/sieve-tools/sieve-dump.c index 23b2be4be..7a5326189 100644 --- a/src/sieve-tools/sieve-dump.c +++ b/src/sieve-tools/sieve-dump.c @@ -45,7 +45,8 @@ int main(int argc, char **argv) int exit_status = EXIT_SUCCESS; int c; - sieve_tool = sieve_tool_init("sieve-dump", &argc, &argv, "DhP:x:", FALSE); + sieve_tool = sieve_tool_init("sieve-dump", &argc, &argv, + "DhP:x:", FALSE); outfile = NULL; @@ -62,16 +63,15 @@ int main(int argc, char **argv) } } - if ( optind < argc ) { + if (optind < argc) { binfile = argv[optind++]; } else { print_help(); i_fatal_status(EX_USAGE, "Missing <script-file> argument"); } - if ( optind < argc ) { + if (optind < argc) outfile = argv[optind++]; - } /* Finish tool initialization */ svinst = sieve_tool_init_finish(sieve_tool, FALSE, TRUE); @@ -81,9 +81,10 @@ int main(int argc, char **argv) /* Dump binary */ sbin = sieve_load(svinst, binfile, NULL); - if ( sbin != NULL ) { - sieve_tool_dump_binary_to(sbin, outfile == NULL ? "-" : outfile, hexdump); - + if (sbin != NULL) { + sieve_tool_dump_binary_to(sbin, + (outfile == NULL ? "-" : outfile), + hexdump); sieve_close(&sbin); } else { i_error("failed to load binary: %s", binfile); @@ -91,7 +92,5 @@ int main(int argc, char **argv) } sieve_tool_deinit(&sieve_tool); - return exit_status; } - -- GitLab