fix sizeof's

This commit is contained in:
derselbst 2017-10-06 21:17:14 +02:00
parent 924d4b3e77
commit 680d4d51a4
3 changed files with 4 additions and 4 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, sizeof(buf)*sizeof(buf[0])) != NULL) {
} else if (fluid_get_userconf(buf, sizeof(buf)) != NULL) {
fluid_source(cmd_handler, buf);
} else if (fluid_get_sysconf(buf, sizeof(buf)*sizeof(buf[0])) != NULL) {
} else if (fluid_get_sysconf(buf, sizeof(buf)) != NULL) {
fluid_source(cmd_handler, buf);
}

View file

@ -571,7 +571,7 @@ new_fluid_synth(fluid_settings_t *settings)
}
else
{
if (fluid_settings_copystr(settings, "synth.volenv", buf, sizeof(buf)/sizeof(buf[0])) == FLUID_OK)
if (fluid_settings_copystr(settings, "synth.volenv", buf, sizeof(buf)) == FLUID_OK)
{
double atten = atof(buf);
if(atten != 0.0)

View file

@ -91,7 +91,7 @@ static const guint primes[] =
13845163,
};
static const unsigned int nprimes = sizeof (primes) / sizeof (primes[0]);
static const unsigned int nprimes = FLUID_N_ELEMENTS(primes);
unsigned int
spaced_primes_closest (unsigned int num)