diff options
Diffstat (limited to 'src/confparser.c')
-rw-r--r-- | src/confparser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/confparser.c b/src/confparser.c index 8547867..019cf14 100644 --- a/src/confparser.c +++ b/src/confparser.c @@ -24,7 +24,7 @@ void initialize_conf(Conf *c) { } int read_next_line(char *line, FILE *f) { - char nextLine[STR_L]; + char nextLine[STR_L] = ""; if (fgets(nextLine, STR_L, f) == NULL) { return -1; } @@ -46,7 +46,7 @@ ConfVar match_variables(char *line, char matched[]) { } void make_config_name(char * ret, const char *confPath) { - char tmp[STR_L]; + char tmp[STR_L] = ""; strcpy(tmp, confPath); strcat(tmp, CONFIG_NAME); @@ -56,9 +56,9 @@ void make_config_name(char * ret, const char *confPath) { int config_file_parse(Conf *conf, UserOpt *opt) { LOG("Using '%s' for ck configuration directory", opt->confDir); FILE *confPtr; - char confName[STR_L]; - char line[STR_L]; - char matched[STR_L]; + char confName[STR_L] = ""; + char line[STR_L] = ""; + char matched[STR_L] = ""; make_config_name(confName, opt->confDir); if ((confPtr = fopen(confName, "r")) == NULL) { |