From 4deb76fc9d48aff71b1f2875eecc4b6964c0a0c7 Mon Sep 17 00:00:00 2001 From: "R. Diez" Date: Sat, 25 Jan 2025 22:06:22 +0100 Subject: [PATCH] options.c: option --help should yield exit code 0 --help is supported and there is no reason to signal failure Change-Id: I59fda5336df47ec0b8172541a5fbfe60014bba7e Signed-off-by: R. Diez Reviewed-on: https://review.openocd.org/c/openocd/+/8723 Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/helper/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helper/options.c b/src/helper/options.c index 50977a610..735b8af5f 100644 --- a/src/helper/options.c +++ b/src/helper/options.c @@ -334,7 +334,7 @@ int parse_cmdline_args(struct command_context *cmd_ctx, int argc, char *argv[]) LOG_OUTPUT(" | -d\tset debug level to \n"); LOG_OUTPUT("--log_output | -l\tredirect log output to file \n"); LOG_OUTPUT("--command | -c\trun \n"); - exit(-1); + exit(0); } if (version_flag) {