diff --git a/fluidsynth/src/bindings/fluid_cmd.c b/fluidsynth/src/bindings/fluid_cmd.c index 6b916ce3..85cb1b3c 100644 --- a/fluidsynth/src/bindings/fluid_cmd.c +++ b/fluidsynth/src/bindings/fluid_cmd.c @@ -823,7 +823,7 @@ fluid_handle_reverbsetlevel(fluid_synth_t* synth, int ac, char** av, fluid_ostre return -1; } level = atof(av[0]); - if (abs(level) > 30){ + if (fabs(level) > 30){ fluid_ostream_printf(out, "rev_setlevel: Value too high! (Value of 10 =+20 dB)\n"); return 0; } diff --git a/fluidsynth/src/midi/fluid_midi.c b/fluidsynth/src/midi/fluid_midi.c index c1571006..9ae332d2 100644 --- a/fluidsynth/src/midi/fluid_midi.c +++ b/fluidsynth/src/midi/fluid_midi.c @@ -479,7 +479,7 @@ fluid_midi_file_read_event(fluid_midi_file *mf, fluid_track_t *track) mf->running_status = status; - if ((status == MIDI_SYSEX)) { /* system exclusif */ + if (status == MIDI_SYSEX) { /* system exclusif */ /* read the length of the message */ if (fluid_midi_file_read_varlen(mf) != FLUID_OK) { return FLUID_FAILED; diff --git a/fluidsynth/src/rvoice/fluid_iir_filter.c b/fluidsynth/src/rvoice/fluid_iir_filter.c index 5b474692..d81ca582 100644 --- a/fluidsynth/src/rvoice/fluid_iir_filter.c +++ b/fluidsynth/src/rvoice/fluid_iir_filter.c @@ -281,7 +281,7 @@ void fluid_iir_filter_calc(fluid_iir_filter_t* iir_filter, fres = 5; /* if filter enabled and there is a significant frequency change.. */ - if ((abs (fres - iir_filter->last_fres) > 0.01)) + if (fabs (fres - iir_filter->last_fres) > 0.01) { /* The filter coefficients have to be recalculated (filter * parameters have changed). Recalculation for various reasons is diff --git a/fluidsynth/src/sfloader/fluid_defsfont.c b/fluidsynth/src/sfloader/fluid_defsfont.c index 3eea95cc..2bb45a48 100644 --- a/fluidsynth/src/sfloader/fluid_defsfont.c +++ b/fluidsynth/src/sfloader/fluid_defsfont.c @@ -1039,7 +1039,7 @@ fluid_defpreset_import_sfont(fluid_defpreset_t* preset, fluid_preset_zone_t* zone; int count; char zone_name[256]; - if ((sfpreset->name != NULL) && (FLUID_STRLEN(sfpreset->name) > 0)) { + if (FLUID_STRLEN(sfpreset->name) > 0) { FLUID_STRCPY(preset->name, sfpreset->name); } else { FLUID_SPRINTF(preset->name, "Bank%d,Preset%d", sfpreset->bank, sfpreset->prenum); @@ -1440,7 +1440,7 @@ fluid_inst_import_sfont(fluid_inst_t* inst, SFInst *sfinst, fluid_defsfont_t* sf int count; p = sfinst->zone; - if ((sfinst->name != NULL) && (FLUID_STRLEN(sfinst->name) > 0)) { + if (FLUID_STRLEN(sfinst->name) > 0) { FLUID_STRCPY(inst->name, sfinst->name); } else { FLUID_STRCPY(inst->name, ""); diff --git a/fluidsynth/src/utils/fluid_sys.c b/fluidsynth/src/utils/fluid_sys.c index ee7d8d92..3daa4c68 100644 --- a/fluidsynth/src/utils/fluid_sys.c +++ b/fluidsynth/src/utils/fluid_sys.c @@ -888,7 +888,7 @@ fluid_istream_gets (fluid_istream_t in, char* buf, int len) return 0; } - if ((c == '\n')) + if (c == '\n') { *buf++ = 0; return 1;