Skip to content

Commit

Permalink
MEMORY command: make strcasecmp() conditional like the following.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Nov 6, 2018
1 parent 249cd93 commit 560cdf3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,7 @@ NULL
void memoryCommand(client *c) {
robj *o;

if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {

if (!strcasecmp(c->argv[1]->ptr,"help") && c->argc == 2) {
const char *help[] = {
"DOCTOR - Return memory problems reports.",
"MALLOC-STATS -- Return internal statistics report from the memory allocator.",
Expand Down

0 comments on commit 560cdf3

Please sign in to comment.