Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
2d53a6a7
Commit
2d53a6a7
authored
Dec 31, 2010
by
Pieter Noordhuis
Browse files
Copy entire callback in one call
parent
a020db30
Changes
1
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
2d53a6a7
...
...
@@ -119,11 +119,11 @@ static int __redisPushCallback(redisCallbackList *list, redisCallback *source) {
redisCallback
*
cb
;
/* Copy callback from stack to heap */
cb
=
c
alloc
(
1
,
sizeof
(
*
cb
));
cb
=
m
alloc
(
sizeof
(
*
cb
));
if
(
!
cb
)
redisOOM
();
if
(
source
!=
NULL
)
{
cb
->
fn
=
source
->
fn
;
cb
->
privdata
=
source
->
privdata
;
memcpy
(
cb
,
source
,
sizeof
(
*
cb
))
;
cb
->
next
=
NULL
;
}
/* Store callback in list */
...
...
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