diff --git a/src/t_set.c b/src/t_set.c index 9d4bab670..a522cd88a 100644 --- a/src/t_set.c +++ b/src/t_set.c @@ -491,7 +491,7 @@ void srandmemberWithCountCommand(redisClient *c) { /* Add all the elements into the temporary dictionary. */ si = setTypeInitIterator(set); while((encoding = setTypeNext(si,&ele,&llele)) != -1) { - int retval; + int retval = DICT_ERR; if (encoding == REDIS_ENCODING_INTSET) { retval = dictAdd(d,createStringObjectFromLongLong(llele),NULL);