Unverified Commit 698e7cbb authored by Lu JJ's avatar Lu JJ Committed by GitHub
Browse files

Fix typo in function name "harndfieldReplyWithListpack" to "hrandfieldReplyWithListpack" (#10623)

parent 719b7665
...@@ -886,7 +886,7 @@ void hscanCommand(client *c) { ...@@ -886,7 +886,7 @@ void hscanCommand(client *c) {
scanGenericCommand(c,o,cursor); scanGenericCommand(c,o,cursor);
} }
static void harndfieldReplyWithListpack(client *c, unsigned int count, listpackEntry *keys, listpackEntry *vals) { static void hrandfieldReplyWithListpack(client *c, unsigned int count, listpackEntry *keys, listpackEntry *vals) {
for (unsigned long i = 0; i < count; i++) { for (unsigned long i = 0; i < count; i++) {
if (vals && c->resp > 2) if (vals && c->resp > 2)
addReplyArrayLen(c,2); addReplyArrayLen(c,2);
...@@ -969,7 +969,7 @@ void hrandfieldWithCountCommand(client *c, long l, int withvalues) { ...@@ -969,7 +969,7 @@ void hrandfieldWithCountCommand(client *c, long l, int withvalues) {
sample_count = count > limit ? limit : count; sample_count = count > limit ? limit : count;
count -= sample_count; count -= sample_count;
lpRandomPairs(hash->ptr, sample_count, keys, vals); lpRandomPairs(hash->ptr, sample_count, keys, vals);
harndfieldReplyWithListpack(c, sample_count, keys, vals); hrandfieldReplyWithListpack(c, sample_count, keys, vals);
} }
zfree(keys); zfree(keys);
zfree(vals); zfree(vals);
...@@ -1071,7 +1071,7 @@ void hrandfieldWithCountCommand(client *c, long l, int withvalues) { ...@@ -1071,7 +1071,7 @@ void hrandfieldWithCountCommand(client *c, long l, int withvalues) {
if (withvalues) if (withvalues)
vals = zmalloc(sizeof(listpackEntry)*count); vals = zmalloc(sizeof(listpackEntry)*count);
serverAssert(lpRandomPairsUnique(hash->ptr, count, keys, vals) == count); serverAssert(lpRandomPairsUnique(hash->ptr, count, keys, vals) == count);
harndfieldReplyWithListpack(c, count, keys, vals); hrandfieldReplyWithListpack(c, count, keys, vals);
zfree(keys); zfree(keys);
zfree(vals); zfree(vals);
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment