From bd40d3158b083920164fc3cb410dd141df3e21a7 Mon Sep 17 00:00:00 2001 From: guybe7 Date: Wed, 28 Sep 2022 11:46:54 +0200 Subject: [PATCH] Remove redundant arity checks in XINFO (#11331) The arity in the JSON files of the subcommands reneder this code unreachable --- src/t_stream.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/t_stream.c b/src/t_stream.c index ea38ab45d..65a9b5899 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -3838,11 +3838,6 @@ void xinfoCommand(client *c) { /* HELP is special. Handle it ASAP. */ if (!strcasecmp(c->argv[1]->ptr,"HELP")) { - if (c->argc != 2) { - addReplySubcommandSyntaxError(c); - return; - } - const char *help[] = { "CONSUMERS ", " Show consumers of .", @@ -3854,9 +3849,6 @@ NULL }; addReplyHelp(c, help); return; - } else if (c->argc < 3) { - addReplySubcommandSyntaxError(c); - return; } /* With the exception of HELP handled before any other sub commands, all