mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
use list wrapper functions in computing the dataset digest
This commit is contained in:
parent
d71b98650f
commit
dc845730a9
14
redis.c
14
redis.c
@ -10923,16 +10923,14 @@ static void computeDatasetDigest(unsigned char *final) {
|
||||
if (o->type == REDIS_STRING) {
|
||||
mixObjectDigest(digest,o);
|
||||
} else if (o->type == REDIS_LIST) {
|
||||
list *list = o->ptr;
|
||||
listNode *ln;
|
||||
listIter li;
|
||||
|
||||
listRewind(list,&li);
|
||||
while((ln = listNext(&li))) {
|
||||
robj *eleobj = listNodeValue(ln);
|
||||
|
||||
lIterator *li = lInitIterator(o,0,REDIS_TAIL);
|
||||
lEntry entry;
|
||||
while(lNext(li,&entry)) {
|
||||
robj *eleobj = lGet(&entry);
|
||||
mixObjectDigest(digest,eleobj);
|
||||
decrRefCount(eleobj);
|
||||
}
|
||||
lReleaseIterator(li);
|
||||
} else if (o->type == REDIS_SET) {
|
||||
dict *set = o->ptr;
|
||||
dictIterator *di = dictGetIterator(set);
|
||||
|
Loading…
Reference in New Issue
Block a user