diff options
author | Yossi Gottlieb <yossigo@gmail.com> | 2013-02-25 21:14:09 +0200 |
---|---|---|
committer | Yossi Gottlieb <yossigo@gmail.com> | 2013-02-25 21:14:09 +0200 |
commit | 1a6f05c5a00a4eef852c09256e2f664bce297e93 (patch) | |
tree | 29df53a44b82d8ebb9fa876c96cdc364e4d87677 /src/t_set.c | |
parent | acb73e8a972adadd31450dca9ab8cf74cc82a029 (diff) | |
parent | 948fdb5f7d20ccd795e8750f60d205022fcee410 (diff) | |
download | redis-2.6.10-1.tar.gz |
Merge upstream 2.6.10.2.6.10-1
Diffstat (limited to 'src/t_set.c')
-rw-r--r-- | src/t_set.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/t_set.c b/src/t_set.c index f384dc76c..2cdcf86c6 100644 --- a/src/t_set.c +++ b/src/t_set.c @@ -451,7 +451,7 @@ void srandmemberWithCountCommand(redisClient *c) { * The number of requested elements is greater than the number of * elements inside the set: simply return the whole set. */ if (count >= size) { - sunionDiffGenericCommand(c,c->argv,c->argc-1,NULL,REDIS_OP_UNION); + sunionDiffGenericCommand(c,c->argv+1,1,NULL,REDIS_OP_UNION); return; } @@ -473,7 +473,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); |