Commit dc845730 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

use list wrapper functions in computing the dataset digest

parent d71b9865
...@@ -10923,16 +10923,14 @@ static void computeDatasetDigest(unsigned char *final) { ...@@ -10923,16 +10923,14 @@ static void computeDatasetDigest(unsigned char *final) {
if (o->type == REDIS_STRING) { if (o->type == REDIS_STRING) {
mixObjectDigest(digest,o); mixObjectDigest(digest,o);
} else if (o->type == REDIS_LIST) { } else if (o->type == REDIS_LIST) {
list *list = o->ptr; lIterator *li = lInitIterator(o,0,REDIS_TAIL);
listNode *ln; lEntry entry;
listIter li; while(lNext(li,&entry)) {
robj *eleobj = lGet(&entry);
listRewind(list,&li);
while((ln = listNext(&li))) {
robj *eleobj = listNodeValue(ln);
mixObjectDigest(digest,eleobj); mixObjectDigest(digest,eleobj);
decrRefCount(eleobj);
} }
lReleaseIterator(li);
} else if (o->type == REDIS_SET) { } else if (o->type == REDIS_SET) {
dict *set = o->ptr; dict *set = o->ptr;
dictIterator *di = dictGetIterator(set); dictIterator *di = dictGetIterator(set);
......
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