From 29c3aff5e2d8d321d098090ee7925351d651ff9f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 8 Sep 2014 12:37:34 -0700 Subject: [PATCH] GUAC-847: Embrace the pointless initialization. --- src/guacd/conf-file.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/guacd/conf-file.c b/src/guacd/conf-file.c index 29fd679d..e21552e1 100644 --- a/src/guacd/conf-file.c +++ b/src/guacd/conf-file.c @@ -105,14 +105,15 @@ static int guacd_conf_callback(const char* section, const char* param, const cha int guacd_conf_parse_file(guacd_config* conf, int fd) { - int line = 1; - char* line_start = NULL; /* Pointless initialization, but this is not obvious enough for some compilers */ - int parsed = 0; + int chars_read; char buffer[8192]; - int chars_read; int length = 0; + int line = 1; + char* line_start = buffer; + int parsed = 0; + /* Attempt to fill remaining space in buffer */ while ((chars_read = read(fd, buffer + length, sizeof(buffer) - length)) > 0) {