From bec0250e9b33c7319ab3cfc81ed90d9b7cb7dc63 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 3 Apr 2021 20:50:00 +0300
Subject: [PATCH] minor style adjustment to music_fluidsynth.c
---
src/codecs/music_fluidsynth.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/codecs/music_fluidsynth.c b/src/codecs/music_fluidsynth.c
index 531afe5..b20b982 100644
--- a/src/codecs/music_fluidsynth.c
+++ b/src/codecs/music_fluidsynth.c
@@ -219,10 +219,9 @@ static FLUIDSYNTH_Music *FLUIDSYNTH_LoadMusic(void *data)
goto fail;
}
- ret = (fluidsynth.fluid_player_add_mem(music->player, rw_mem, rw_size) == FLUID_OK);
+ ret = fluidsynth.fluid_player_add_mem(music->player, rw_mem, rw_size);
SDL_free(rw_mem);
-
- if (!ret) {
+ if (ret != FLUID_OK) {
Mix_SetError("FluidSynth failed to load in-memory song");
goto fail;
}
@@ -316,19 +315,15 @@ static void FLUIDSYNTH_Delete(void *context)
if (music->player) {
fluidsynth.delete_fluid_player(music->player);
}
-
if (music->synth) {
fluidsynth.delete_fluid_synth(music->synth);
}
-
if (music->settings) {
fluidsynth.delete_fluid_settings(music->settings);
}
-
if (music->stream) {
SDL_FreeAudioStream(music->stream);
}
-
if (music->buffer) {
SDL_free(music->buffer);
}