[MPlayer-cvslog] r35942 - trunk/gui/dialog/fileselect.c

ib subversion at mplayerhq.hu
Sun Mar 10 15:25:54 CET 2013


Author: ib
Date: Sun Mar 10 15:25:54 2013
New Revision: 35942

Log:
Change return condition in fs_PersistantHistory().

Since it's only called by fsType fsVideoSelector,
the condition is pointless. Check subject instead.

As a result, strdup() can be used now.

Modified:
   trunk/gui/dialog/fileselect.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Sun Mar 10 15:25:02 2013	(r35941)
+++ trunk/gui/dialog/fileselect.c	Sun Mar 10 15:25:54 2013	(r35942)
@@ -388,7 +388,7 @@ static void fs_PersistantHistory( char *
  unsigned int i;
  char * entry;
 
- if ( fsType != fsVideoSelector ) return;
+ if ( !subject ) return;
 
  for ( i=0;i < FF_ARRAY_ELEMS(fsHistory);i++ )
   if ( fsHistory[i] && !strcmp( fsHistory[i],subject ) )
@@ -400,7 +400,7 @@ static void fs_PersistantHistory( char *
   {
    i=FF_ARRAY_ELEMS(fsHistory)-1;
    nfree( fsHistory[i] );
-   entry=gstrdup( subject );
+   entry=strdup( subject );
   }
  for ( ;i;i-- ) fsHistory[i]=fsHistory[i - 1];
  fsHistory[0]=entry;


More information about the MPlayer-cvslog mailing list