From 88bf37d91a12d0048c24fdfb6db7b4de91377479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 7 Apr 2021 15:27:55 +0200 Subject: [PATCH] zed: _zed_conf_display_help(): be consistent about what got_err means MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Users passed in EXIT_SUCCESS and EXIT_FAILURE, despite it being a bool Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #11860 --- cmd/zed/zed_conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/zed/zed_conf.c b/cmd/zed/zed_conf.c index cfbbe11ebb..783e1dfd73 100644 --- a/cmd/zed/zed_conf.c +++ b/cmd/zed/zed_conf.c @@ -126,7 +126,7 @@ zed_conf_destroy(struct zed_conf *zcp) * otherwise, output to stderr and exit with a failure status. */ static void -_zed_conf_display_help(const char *prog, int got_err) +_zed_conf_display_help(const char *prog, boolean_t got_err) { struct opt { const char *o, *d, *v; }; @@ -257,7 +257,7 @@ zed_conf_parse_opts(struct zed_conf *zcp, int argc, char **argv) while ((opt = getopt(argc, argv, opts)) != -1) { switch (opt) { case 'h': - _zed_conf_display_help(argv[0], EXIT_SUCCESS); + _zed_conf_display_help(argv[0], B_FALSE); break; case 'L': _zed_conf_display_license(); @@ -309,11 +309,11 @@ zed_conf_parse_opts(struct zed_conf *zcp, int argc, char **argv) case '?': default: if (optopt == '?') - _zed_conf_display_help(argv[0], EXIT_SUCCESS); + _zed_conf_display_help(argv[0], B_FALSE); fprintf(stderr, "%s: Invalid option '-%c'\n\n", argv[0], optopt); - _zed_conf_display_help(argv[0], EXIT_FAILURE); + _zed_conf_display_help(argv[0], B_TRUE); break; } }