diff options
author | nicm <nicm> | 2022-02-14 09:10:48 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 14:19:49 +0100 |
commit | 2adbe3ec1606806e31c74507cfa0225327e27225 (patch) | |
tree | 42ab3f0a0dd1196b97b74ed218044296ac348c33 | |
parent | 9efa4199554b4b5613a19bf5b4d9036869978b4c (diff) | |
download | rtmux-2adbe3ec1606806e31c74507cfa0225327e27225.tar.gz rtmux-2adbe3ec1606806e31c74507cfa0225327e27225.tar.bz2 rtmux-2adbe3ec1606806e31c74507cfa0225327e27225.zip |
Do not return error with -q, GitHub issue 3065.
-rw-r--r-- | cmd-show-options.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c index 90226ad3..252a33c6 100644 --- a/cmd-show-options.c +++ b/cmd-show-options.c @@ -102,7 +102,7 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item) name = options_match(argument, &idx, &ambiguous); if (name == NULL) { if (args_has(args, 'q')) - goto fail; + goto out; if (ambiguous) cmdq_error(item, "ambiguous option: %s", argument); else @@ -113,7 +113,7 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item) &cause); if (scope == OPTIONS_TABLE_NONE) { if (args_has(args, 'q')) - goto fail; + goto out; cmdq_error(item, "%s", cause); free(cause); goto fail; @@ -128,11 +128,12 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item) cmd_show_options_print(self, item, o, idx, parent); else if (*name == '@') { if (args_has(args, 'q')) - goto fail; + goto out; cmdq_error(item, "invalid option: %s", argument); goto fail; } +out: free(name); free(argument); return (CMD_RETURN_NORMAL); |