mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Uses an offset in addReplyHelp
This commit is contained in:
parent
8b51121998
commit
b23c8babed
@ -604,19 +604,17 @@ void addReplyHelp(client *c, const char **help) {
|
|||||||
sds cmd = sdsnew((char*) c->argv[0]->ptr);
|
sds cmd = sdsnew((char*) c->argv[0]->ptr);
|
||||||
void *blenp = addDeferredMultiBulkLength(c);
|
void *blenp = addDeferredMultiBulkLength(c);
|
||||||
int blen = 0;
|
int blen = 0;
|
||||||
int hlen = 0;
|
|
||||||
|
|
||||||
sdstoupper(cmd);
|
sdstoupper(cmd);
|
||||||
addReplyStatusFormat(c,
|
addReplyStatusFormat(c,
|
||||||
"%s <subcommand> arg arg ... arg. Subcommands are:",cmd);
|
"%s <subcommand> arg arg ... arg. Subcommands are:",cmd);
|
||||||
blen++;
|
|
||||||
sdsfree(cmd);
|
sdsfree(cmd);
|
||||||
|
|
||||||
while (help[hlen]) {
|
while (help[blen]) {
|
||||||
addReplyStatus(c,help[hlen++]);
|
addReplyStatus(c,help[blen++]);
|
||||||
blen++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blen += 1; /* Account for the header line(s). */
|
||||||
setDeferredMultiBulkLength(c,blenp,blen);
|
setDeferredMultiBulkLength(c,blenp,blen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user