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

ib subversion at mplayerhq.hu
Sat Sep 5 21:02:56 CEST 2015


Author: ib
Date: Sat Sep  5 21:02:56 2015
New Revision: 37480

Log:
Simplify code.

gstrcmp() can handle NULL pointer arguments.

Modified:
   trunk/gui/dialog/fileselect.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Sat Sep  5 20:33:36 2015	(r37479)
+++ trunk/gui/dialog/fileselect.c	Sat Sep  5 21:02:56 2015	(r37480)
@@ -534,12 +534,8 @@ static void fs_Ok_released(GtkButton *bu
         else if (strcmp(fsImageFilterNames[fsLastImageFilterSelected][0], MSGTR_GUI_FilterImageDVD) == 0)
             ev = evPlayDVD;
 
-        if (ev == evPlayDVD) {
-            char *ext = strrchr(fsSelectedFile, '.');
-
-            if (ext && (strcmp(ext, ".ifo") == 0))
-                fsSelectedFile = "";
-        }
+        if (ev == evPlayDVD && gstrcmp(strrchr(fsSelectedFile, '.'), ".ifo") == 0)
+            fsSelectedFile = "";
 
         uiUnsetFile();
         setddup(&guiInfo.ImageFilename, fsSelectedDirectory, fsSelectedFile);


More information about the MPlayer-cvslog mailing list