} else if (hi->encoding == REDIS_ENCODING_HT) {
hi->di = dictGetIterator(subject->ptr);
} else {
- redisAssert(NULL);
+ redisAssertWithInfo(NULL,subject,0);
}
return hi;
}
unsigned int klen, vlen;
dict *dict = dictCreate(&hashDictType,NULL);
- redisAssert(o->type == REDIS_HASH && o->encoding != REDIS_ENCODING_HT);
+ redisAssertWithInfo(NULL,o,o->type == REDIS_HASH && o->encoding != REDIS_ENCODING_HT);
p = zipmapRewind(zm);
while((p = zipmapNext(p,&key,&klen,&val,&vlen)) != NULL) {
robj *keyobj, *valobj;
for (j = 2; j < c->argc; j++) {
if (hashTypeDelete(o,c->argv[j])) {
- if (hashTypeLength(o) == 0) dbDelete(c->db,c->argv[1]);
deleted++;
+ if (hashTypeLength(o) == 0) {
+ dbDelete(c->db,c->argv[1]);
+ break;
+ }
}
}
if (deleted) {