diff options
author | Itamar Haber <itamar@redislabs.com> | 2017-11-28 18:18:45 +0200 |
---|---|---|
committer | Itamar Haber <itamar@redislabs.com> | 2017-11-28 18:18:45 +0200 |
commit | 8c7f90e91e1e6324db8a1e9ca20e3dc95ce049d0 (patch) | |
tree | 902682d4aed13d03dd10a2cfcdb26bd4421e8690 | |
parent | 75fa7879e6b4408247db6b7eba3def64c00d4f9a (diff) | |
download | redis-8c7f90e91e1e6324db8a1e9ca20e3dc95ce049d0.tar.gz |
Standardizes arity handling of DEBUG
-rw-r--r-- | src/debug.c | 5 | ||||
-rw-r--r-- | src/server.c | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/debug.c b/src/debug.c index 5c3fd3471..a058737c1 100644 --- a/src/debug.c +++ b/src/debug.c @@ -262,11 +262,6 @@ void computeDatasetDigest(unsigned char *final) { } void debugCommand(client *c) { - if (c->argc == 1) { - addReplyError(c,"You must specify a subcommand for DEBUG. Try DEBUG HELP for info."); - return; - } - if (!strcasecmp(c->argv[1]->ptr,"help")) { void *blenp = addDeferredMultiBulkLength(c); int blen = 0; diff --git a/src/server.c b/src/server.c index 6bc8bc66f..30c5297a8 100644 --- a/src/server.c +++ b/src/server.c @@ -258,7 +258,7 @@ struct redisCommand redisCommandTable[] = { {"persist",persistCommand,2,"wF",0,NULL,1,1,1,0,0}, {"slaveof",slaveofCommand,3,"ast",0,NULL,0,0,0,0,0}, {"role",roleCommand,1,"lst",0,NULL,0,0,0,0,0}, - {"debug",debugCommand,-1,"as",0,NULL,0,0,0,0,0}, + {"debug",debugCommand,-2,"as",0,NULL,0,0,0,0,0}, {"config",configCommand,-2,"lat",0,NULL,0,0,0,0,0}, {"subscribe",subscribeCommand,-2,"pslt",0,NULL,0,0,0,0,0}, {"unsubscribe",unsubscribeCommand,-1,"pslt",0,NULL,0,0,0,0,0}, |