]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
options.c: option --help should yield exit code 0
authorR. Diez <rdiezmail-openocd@yahoo.de>
Sat, 25 Jan 2025 21:06:22 +0000 (22:06 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 16 Feb 2025 16:28:07 +0000 (16:28 +0000)
--help is supported and there is no reason to signal failure

Change-Id: I59fda5336df47ec0b8172541a5fbfe60014bba7e
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8723
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/helper/options.c

index 50977a61060a589a43eb232a95677c1fb4596eaf..735b8af5f637c9e2414bb787bb6f54e77db6faa2 100644 (file)
@@ -334,7 +334,7 @@ int parse_cmdline_args(struct command_context *cmd_ctx, int argc, char *argv[])
                LOG_OUTPUT("             | -d<n>\tset debug level to <level>\n");
                LOG_OUTPUT("--log_output | -l\tredirect log output to file <name>\n");
                LOG_OUTPUT("--command    | -c\trun <command>\n");
-               exit(-1);
+               exit(0);
        }
 
        if (version_flag) {