summaryrefslogtreecommitdiff
path: root/src/intset.c
diff options
context:
space:
mode:
authorhujiecs <2844633656@qq.com>2018-10-16 15:48:03 +0800
committerhujiecs <2844633656@qq.com>2018-10-16 15:48:03 +0800
commit297950e8b817dbf3f2dbbbff497fdf3a047cc8f2 (patch)
tree0429b3008cf4e809145e4e87746c520b1fee6c2f /src/intset.c
parent1caabd59b2f746f7c35900486c072e35898cb232 (diff)
downloadredis-297950e8b817dbf3f2dbbbff497fdf3a047cc8f2.tar.gz
several typos fixed, optimize MSETNX to avoid unnecessary loop
Diffstat (limited to 'src/intset.c')
-rw-r--r--src/intset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intset.c b/src/intset.c
index 198c90aa1..4445a5ca6 100644
--- a/src/intset.c
+++ b/src/intset.c
@@ -123,7 +123,7 @@ static uint8_t intsetSearch(intset *is, int64_t value, uint32_t *pos) {
} else {
/* Check for the case where we know we cannot find the value,
* but do know the insert position. */
- if (value > _intsetGet(is,intrev32ifbe(is->length)-1)) {
+ if (value > _intsetGet(is,max)) {
if (pos) *pos = intrev32ifbe(is->length);
return 0;
} else if (value < _intsetGet(is,0)) {