mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
retval doesn't initalized
If each if conditions are all fail, variable retval will under uninitlized
This commit is contained in:
parent
f95b393603
commit
8063155cd0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user