From 8d3e5a2d847eebc49f4bad7d9fab49ed2ca7f5a0 Mon Sep 17 00:00:00 2001 From: Timo Korvola Date: Sat, 3 Mar 2018 17:40:35 +0200 Subject: [PATCH] Useless use of dup. --- src/sdl/sf_sound.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sdl/sf_sound.c b/src/sdl/sf_sound.c index 0e61644..1ffdc66 100644 --- a/src/sdl/sf_sound.c +++ b/src/sdl/sf_sound.c @@ -231,9 +231,7 @@ static EFFECT *getmodule( FILE *f, size_t pos, int len, int num) } else { - FILE *f2 = fdopen(dup(fileno(f)),"rb"); - fseek(f2,pos,SEEK_SET); - res->mod = Mix_LoadMUS_RW(SDL_RWFromFP(f2,1)); + res->mod = Mix_LoadMUS_RW(SDL_RWFromFP(f, false)); } if (!res->mod) { -- 2.34.1