Fix potential undefined struct read

All the assignments to cb are inside conditionals, so it's
vaguely possible it never gets initialized before we try
to read from it with (cb.fn == NULL).

Condition discovered with scan-build.

Closes #229
This commit is contained in:
Matt Stancliff 2014-04-07 11:32:16 -04:00
parent e35266e68f
commit 61eeedbe77

View File

@ -391,7 +391,7 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply,
void redisProcessCallbacks(redisAsyncContext *ac) { void redisProcessCallbacks(redisAsyncContext *ac) {
redisContext *c = &(ac->c); redisContext *c = &(ac->c);
redisCallback cb; redisCallback cb = {NULL, NULL, NULL};
void *reply = NULL; void *reply = NULL;
int status; int status;