Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b23c8bab
Commit
b23c8bab
authored
Dec 05, 2017
by
Itamar Haber
Browse files
Uses an offset in addReplyHelp
parent
8b511219
Changes
1
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
b23c8bab
...
...
@@ -604,19 +604,17 @@ void addReplyHelp(client *c, const char **help) {
sds
cmd
=
sdsnew
((
char
*
)
c
->
argv
[
0
]
->
ptr
);
void
*
blenp
=
addDeferredMultiBulkLength
(
c
);
int
blen
=
0
;
int
hlen
=
0
;
sdstoupper
(
cmd
);
addReplyStatusFormat
(
c
,
"%s <subcommand> arg arg ... arg. Subcommands are:"
,
cmd
);
blen
++
;
sdsfree
(
cmd
);
while
(
help
[
hlen
])
{
addReplyStatus
(
c
,
help
[
hlen
++
]);
blen
++
;
while
(
help
[
blen
])
{
addReplyStatus
(
c
,
help
[
blen
++
]);
}
blen
+=
1
;
/* Account for the header line(s). */
setDeferredMultiBulkLength
(
c
,
blenp
,
blen
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment