dont hardcode buf size

This commit is contained in:
Tom M 2017-10-06 13:15:09 +02:00 committed by GitHub
parent 82b2000d08
commit 5ae62791ae
1 changed files with 2 additions and 2 deletions

View File

@ -695,9 +695,9 @@ int main(int argc, char** argv)
/* try to load the user or system configuration */
if (config_file != NULL) {
fluid_source(cmd_handler, config_file);
} else if (fluid_get_userconf(buf, 512) != NULL) {
} else if (fluid_get_userconf(buf, sizeof(buf)*sizeof(buf[0])) != NULL) {
fluid_source(cmd_handler, buf);
} else if (fluid_get_sysconf(buf, 512) != NULL) {
} else if (fluid_get_sysconf(buf, sizeof(buf)*sizeof(buf[0])) != NULL) {
fluid_source(cmd_handler, buf);
}