changeset 710:c75c2b332bce trunk

[svn] - C99 style enforcement
author nenolod
date Sat, 24 Feb 2007 09:02:41 -0800
parents 90d02e8da818
children 5c77a76df782
files ChangeLog src/madplug/replaygain.c
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Feb 24 08:59:37 2007 -0800
+++ b/ChangeLog	Sat Feb 24 09:02:41 2007 -0800
@@ -1,3 +1,12 @@
+2007-02-24 16:59:37 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1504]
+  - ensure that we only operate on a duplicated fd if our source is 
+    from a live fd
+  
+  trunk/src/madplug/replaygain.c |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-02-24 16:58:32 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1502]
   - close configdb handle
--- a/src/madplug/replaygain.c	Sat Feb 24 08:59:37 2007 -0800
+++ b/src/madplug/replaygain.c	Sat Feb 24 09:02:41 2007 -0800
@@ -196,15 +196,15 @@
 
 void input_read_replaygain(struct mad_info_t *file_info)
 {
+    VFSFile *fp;
+    glong curpos = 0;
+
     file_info->has_replaygain = FALSE;
     file_info->replaygain_album_scale = -1;
     file_info->replaygain_track_scale = -1;
     file_info->mp3gain_undo = -77;
     file_info->mp3gain_minmax = -77;
 
-    VFSFile *fp;
-    glong curpos = 0;
-
     if (file_info->infile) {
         fp = vfs_dup(file_info->infile);
         curpos = vfs_ftell(fp);
@@ -257,6 +257,5 @@
     if (curpos)
         vfs_fseek(fp, curpos, SEEK_SET);
     else
-        vfs_fclose(fp);
-        
+        vfs_fclose(fp);        
 }