From 2894bcd7ff69a596c955241800558591e45068c4 Mon Sep 17 00:00:00 2001 From: Anshul Maheshwari Date: Tue, 22 Jul 2014 15:36:00 +0530 Subject: [PATCH] closed cid 26479 getc does not match eof --- src/configuration.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/configuration.c b/src/configuration.c index 1e263193..1aa1ef6e 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -111,12 +111,12 @@ static int parse_opts(char *str, struct ccx_s_options *opt) static void parse_file(FILE *f,struct ccx_s_options *opt) { char *str = (char*)malloc(128); - unsigned char c = '\0'; + char c = '\0'; int comments = 0; int i = 0; int ret = 0; *str = '\0'; - while ((c = (unsigned char)fgetc(f)) != EOF ) + while ((c = (char)fgetc(f)) != EOF ) { if( c == '\n') { @@ -136,7 +136,7 @@ static void parse_file(FILE *f,struct ccx_s_options *opt) comments = 1; continue; } - str[i] = (char)c; + str[i] = c; i++; } free(str);