X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fconf.c;h=7fa2863c56776ff1abd17d23485629e121304c15;hb=df92291f7ae1d035d1fb931161ec1b577656e0de;hp=6c93e1e3a8692c53b0e17c7d13d4f7a5d816d81b;hpb=9db35e515b92dc21e241d536f8a3798e609f97ba;p=ncmpc.git diff --git a/src/conf.c b/src/conf.c index 6c93e1e..7fa2863 100644 --- a/src/conf.c +++ b/src/conf.c @@ -377,10 +377,8 @@ parse_line(char *line) bool match_found; /* get the name part */ - while (i < len && line[i] != '=' && - !g_ascii_isspace(line[i])) { + while (i < len && line[i] != '=' && !g_ascii_isspace(line[i])) name[j++] = line[i++]; - } name[j] = '\0'; @@ -535,8 +533,7 @@ parse_line(char *line) match_found = false; if (!match_found) - print_error(_("Unknown configuration parameter"), - name); + print_error(_("Unknown configuration parameter"), name); return match_found; } @@ -578,7 +575,11 @@ check_user_conf_dir(void) return 0; } +#ifndef WIN32 retval = mkdir(directory, 0755); +#else + retval = mkdir(directory); +#endif g_free(directory); return retval; }