Useless use of dup.
authorTimo Korvola <tkorvola@iki.fi>
Sat, 3 Mar 2018 15:40:35 +0000 (17:40 +0200)
committerDavid Griffith <dave@661.org>
Sun, 11 Mar 2018 11:48:50 +0000 (04:48 -0700)
src/sdl/sf_sound.c

index 0e61644f1e690198065171ace183b5968dc47e24..1ffdc66398e9b06b77b99a6856ca5f56993030a5 100644 (file)
@@ -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)
        {