From 1dd2982f0678bc984e5a8b21694ca22bd71f45e1 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 9 Apr 2014 22:13:49 -0700 Subject: [PATCH] GUAC-611: Fix initialization of stream. --- src/libguac/client-handlers.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libguac/client-handlers.c b/src/libguac/client-handlers.c index 22267805..a9e1326b 100644 --- a/src/libguac/client-handlers.c +++ b/src/libguac/client-handlers.c @@ -101,8 +101,6 @@ int __guac_handle_key(guac_client* client, guac_instruction* instruction) { static guac_stream* __get_input_stream(guac_client* client, int stream_index) { - guac_stream* stream; - /* Validate stream index */ if (stream_index < 0 || stream_index >= GUAC_CLIENT_MAX_STREAMS) { @@ -114,7 +112,7 @@ static guac_stream* __get_input_stream(guac_client* client, int stream_index) { return NULL; } - return stream; + return &(client->__input_streams[stream_index]); } @@ -150,7 +148,6 @@ static guac_stream* __init_input_stream(guac_client* client, int stream_index) { return NULL; /* Initialize stream */ - stream = &(client->__input_streams[stream_index]); stream->index = stream_index; stream->data = NULL; stream->ack_handler = NULL;