[MPlayer-cvslog] r25739 - trunk/gui/cfg.c

reimar subversion at mplayerhq.hu
Sun Jan 13 17:22:44 CET 2008


Author: reimar
Date: Sun Jan 13 17:22:43 2008
New Revision: 25739

Log:
Fix 100l: error check for m_option_print was unreachable


Modified:
   trunk/gui/cfg.c

Modified: trunk/gui/cfg.c
==============================================================================
--- trunk/gui/cfg.c	(original)
+++ trunk/gui/cfg.c	Sun Jan 13 17:22:43 2008
@@ -293,11 +293,14 @@ int cfg_write( void )
    for ( i=0;gui_opts[i].name;i++ )
     {
       char* v = m_option_print(&gui_opts[i],gui_opts[i].p);
+      if(v == (char *)-1) {
+        mp_msg(MSGT_GPLAYER,MSGL_WARN,MSGTR_UnableToSaveOption, gui_opts[i].name);
+        v = NULL;
+      }
       if(v) {
 	fprintf( f,"%s = \"%s\"\n",gui_opts[i].name, v);
 	free(v);
-      } else if((int)v == -1)
-	mp_msg(MSGT_GPLAYER,MSGL_WARN,MSGTR_UnableToSaveOption, gui_opts[i].name);
+      }
     }
    fclose( f );
   }



More information about the MPlayer-cvslog mailing list