From: Timo Korvola Date: Sat, 3 Mar 2018 15:40:35 +0000 (+0200) Subject: Useless use of dup. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=8d3e5a2d847eebc49f4bad7d9fab49ed2ca7f5a0;p=liskon_frotz.git Useless use of dup. --- 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) {