summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu JJ <41555481+ncghost1@users.noreply.github.com>2022-05-09 20:04:39 +0800
committerGitHub <noreply@github.com>2022-05-09 15:04:39 +0300
commit6b44e4ea92edd0f06971b5b7354769255fde66a8 (patch)
tree838a9f107951d37fc6ac2c0cb12440844e9a2127
parent2bcd890d8aa645cab0d8fd0ed765c52a997de4f5 (diff)
downloadredis-6b44e4ea92edd0f06971b5b7354769255fde66a8.tar.gz
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`
-rw-r--r--src/t_zset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/t_zset.c b/src/t_zset.c
index 7796a6dec..2efa73936 100644
--- a/src/t_zset.c
+++ b/src/t_zset.c
@@ -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);