mirror of https://mirror.osredm.com/root/redis.git
fix some typos in "t_zset.c" (#10670)
fix some typo in "t_zset.c". 1. `zzlisinlexrange` the function name mentioned in the comment is misspelled. 2. fix typo in function name`zarndmemberReplyWithListpack` -> `zrandmemberReplyWithListpack`
This commit is contained in:
parent
2bcd890d8a
commit
6b44e4ea92
|
@ -927,7 +927,7 @@ int zzlLexValueLteMax(unsigned char *p, zlexrangespec *spec) {
|
|||
}
|
||||
|
||||
/* Returns if there is a part of the zset is in range. Should only be used
|
||||
* internally by zzlFirstInRange and zzlLastInRange. */
|
||||
* internally by zzlFirstInLexRange and zzlLastInLexRange. */
|
||||
int zzlIsInLexRange(unsigned char *zl, zlexrangespec *range) {
|
||||
unsigned char *p;
|
||||
|
||||
|
@ -4054,7 +4054,7 @@ void bzpopmaxCommand(client *c) {
|
|||
blockingGenericZpopCommand(c, c->argv+1, c->argc-2, ZSET_MAX, c->argc-1, -1, 0, 0);
|
||||
}
|
||||
|
||||
static void zarndmemberReplyWithListpack(client *c, unsigned int count, listpackEntry *keys, listpackEntry *vals) {
|
||||
static void zrandmemberReplyWithListpack(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);
|
||||
|
@ -4135,7 +4135,7 @@ void zrandmemberWithCountCommand(client *c, long l, int withscores) {
|
|||
sample_count = count > limit ? limit : count;
|
||||
count -= sample_count;
|
||||
lpRandomPairs(zsetobj->ptr, sample_count, keys, vals);
|
||||
zarndmemberReplyWithListpack(c, sample_count, keys, vals);
|
||||
zrandmemberReplyWithListpack(c, sample_count, keys, vals);
|
||||
}
|
||||
zfree(keys);
|
||||
zfree(vals);
|
||||
|
@ -4234,7 +4234,7 @@ void zrandmemberWithCountCommand(client *c, long l, int withscores) {
|
|||
if (withscores)
|
||||
vals = zmalloc(sizeof(listpackEntry)*count);
|
||||
serverAssert(lpRandomPairsUnique(zsetobj->ptr, count, keys, vals) == count);
|
||||
zarndmemberReplyWithListpack(c, count, keys, vals);
|
||||
zrandmemberReplyWithListpack(c, count, keys, vals);
|
||||
zfree(keys);
|
||||
zfree(vals);
|
||||
zuiClearIterator(&src);
|
||||
|
|
Loading…
Reference in New Issue