prefer !
Signed-off-by: xhe <xw897002528@gmail.com>
This commit is contained in:
parent
7a7c60459e
commit
50d750733e
@ -2768,7 +2768,7 @@ void helloCommand(client *c) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = ver == 0 ? 1 : 2; j < c->argc; j++) {
|
for (int j = !ver ? 1 : 2; j < c->argc; j++) {
|
||||||
int moreargs = (c->argc-1) - j;
|
int moreargs = (c->argc-1) - j;
|
||||||
const char *opt = c->argv[j]->ptr;
|
const char *opt = c->argv[j]->ptr;
|
||||||
if (!strcasecmp(opt,"AUTH") && moreargs >= 2) {
|
if (!strcasecmp(opt,"AUTH") && moreargs >= 2) {
|
||||||
@ -2796,7 +2796,7 @@ void helloCommand(client *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Let's switch to the specified RESP mode. */
|
/* Let's switch to the specified RESP mode. */
|
||||||
if (ver != 0) c->resp = ver;
|
if (!!ver) c->resp = ver;
|
||||||
addReplyMapLen(c,6 + !server.sentinel_mode);
|
addReplyMapLen(c,6 + !server.sentinel_mode);
|
||||||
|
|
||||||
addReplyBulkCString(c,"server");
|
addReplyBulkCString(c,"server");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user