Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
698e7cbb
Unverified
Commit
698e7cbb
authored
Apr 24, 2022
by
Lu JJ
Committed by
GitHub
Apr 24, 2022
Browse files
Fix typo in function name "harndfieldReplyWithListpack" to "hrandfieldReplyWithListpack" (#10623)
parent
719b7665
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_hash.c
View file @
698e7cbb
...
...
@@ -886,7 +886,7 @@ void hscanCommand(client *c) {
scanGenericCommand
(
c
,
o
,
cursor
);
}
static
void
h
a
rndfieldReplyWithListpack
(
client
*
c
,
unsigned
int
count
,
listpackEntry
*
keys
,
listpackEntry
*
vals
)
{
static
void
hr
a
ndfieldReplyWithListpack
(
client
*
c
,
unsigned
int
count
,
listpackEntry
*
keys
,
listpackEntry
*
vals
)
{
for
(
unsigned
long
i
=
0
;
i
<
count
;
i
++
)
{
if
(
vals
&&
c
->
resp
>
2
)
addReplyArrayLen
(
c
,
2
);
...
...
@@ -969,7 +969,7 @@ void hrandfieldWithCountCommand(client *c, long l, int withvalues) {
sample_count
=
count
>
limit
?
limit
:
count
;
count
-=
sample_count
;
lpRandomPairs
(
hash
->
ptr
,
sample_count
,
keys
,
vals
);
h
a
rndfieldReplyWithListpack
(
c
,
sample_count
,
keys
,
vals
);
hr
a
ndfieldReplyWithListpack
(
c
,
sample_count
,
keys
,
vals
);
}
zfree
(
keys
);
zfree
(
vals
);
...
...
@@ -1071,7 +1071,7 @@ void hrandfieldWithCountCommand(client *c, long l, int withvalues) {
if
(
withvalues
)
vals
=
zmalloc
(
sizeof
(
listpackEntry
)
*
count
);
serverAssert
(
lpRandomPairsUnique
(
hash
->
ptr
,
count
,
keys
,
vals
)
==
count
);
h
a
rndfieldReplyWithListpack
(
c
,
count
,
keys
,
vals
);
hr
a
ndfieldReplyWithListpack
(
c
,
count
,
keys
,
vals
);
zfree
(
keys
);
zfree
(
vals
);
return
;
...
...
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