Skip to content

Commit

Permalink
lib-dict: Compiler warning fix
Browse files Browse the repository at this point in the history
I don't think it's possible that error was used uninitialized, but some gcc
version seems to think so.
  • Loading branch information
sirainen committed May 8, 2016
1 parent cbe2d47 commit 3fdae9c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib-dict/dict-redis.c
Expand Up @@ -275,7 +275,7 @@ redis_conn_input_more(struct redis_connection *conn, const char **error_r)
static void redis_conn_input(struct connection *_conn)
{
struct redis_connection *conn = (struct redis_connection *)_conn;
const char *error;
const char *error = NULL;
int ret;

switch (i_stream_read(_conn->input)) {
Expand All @@ -289,8 +289,10 @@ static void redis_conn_input(struct connection *_conn)
}

while ((ret = redis_conn_input_more(conn, &error)) > 0) ;
if (ret < 0)
if (ret < 0) {
i_assert(error != NULL);
redis_disconnected(conn, error);
}
}

static void redis_conn_connected(struct connection *_conn, bool success)
Expand Down

0 comments on commit 3fdae9c

Please sign in to comment.