if /dev/urandom is not available use rand() to get a random node name

This commit is contained in:
antirez
2011-05-04 10:30:22 +02:00
parent 35845afba0
commit a5dce40726
2 changed files with 4 additions and 6 deletions

View File

@ -1233,7 +1233,7 @@ int zuiNext(zsetopsrc *op, zsetopval *val) {
if (op->type == REDIS_SET) {
iterset *it = &op->iter.set;
if (op->encoding == REDIS_ENCODING_INTSET) {
if (!intsetGet(it->is.is,it->is.ii,&val->ell))
if (!intsetGet(it->is.is,it->is.ii,(int64_t*)&val->ell))
return 0;
val->score = 1.0;