Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
8063155c
Commit
8063155c
authored
Feb 05, 2013
by
Rock Li
Browse files
retval doesn't initalized
If each if conditions are all fail, variable retval will under uninitlized
parent
f95b3936
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_set.c
View file @
8063155c
...
@@ -491,7 +491,7 @@ void srandmemberWithCountCommand(redisClient *c) {
...
@@ -491,7 +491,7 @@ void srandmemberWithCountCommand(redisClient *c) {
/* Add all the elements into the temporary dictionary. */
/* Add all the elements into the temporary dictionary. */
si
=
setTypeInitIterator
(
set
);
si
=
setTypeInitIterator
(
set
);
while
((
encoding
=
setTypeNext
(
si
,
&
ele
,
&
llele
))
!=
-
1
)
{
while
((
encoding
=
setTypeNext
(
si
,
&
ele
,
&
llele
))
!=
-
1
)
{
int
retval
;
int
retval
=
DICT_ERR
;
if
(
encoding
==
REDIS_ENCODING_INTSET
)
{
if
(
encoding
==
REDIS_ENCODING_INTSET
)
{
retval
=
dictAdd
(
d
,
createStringObjectFromLongLong
(
llele
),
NULL
);
retval
=
dictAdd
(
d
,
createStringObjectFromLongLong
(
llele
),
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment