[vlc-commits] subtitles: Remove unneeded clauses.

Hugo Beauzée-Luyssen git at videolan.org
Tue Apr 10 16:04:37 CEST 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Apr 10 15:39:09 2012 +0200| [f97effab97f11c8b187e4734b452fd88a92fa713] | committer: Hugo Beauzée-Luyssen

subtitles: Remove unneeded clauses.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f97effab97f11c8b187e4734b452fd88a92fa713
---

 src/input/subtitles.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/input/subtitles.c b/src/input/subtitles.c
index ed0382c..d44f459 100644
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -336,13 +336,12 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
             strcpy_trim( tmp_fname_trim, tmp_fname_noext );
 
             i_prio = SUB_PRIORITY_NONE;
-            if( i_prio == SUB_PRIORITY_NONE && !strcmp( tmp_fname_trim, f_fname_trim ) )
+            if( !strcmp( tmp_fname_trim, f_fname_trim ) )
             {
                 /* matches the movie name exactly */
                 i_prio = SUB_PRIORITY_MATCH_ALL;
             }
-            if( i_prio == SUB_PRIORITY_NONE &&
-                ( tmp = strstr( tmp_fname_trim, f_fname_trim ) ) )
+            else if( (tmp = strstr( tmp_fname_trim, f_fname_trim )) )
             {
                 /* contains the movie name */
                 tmp += strlen( f_fname_trim );
@@ -358,7 +357,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
                     i_prio = SUB_PRIORITY_MATCH_LEFT;
                 }
             }
-            if( i_prio == SUB_PRIORITY_NONE &&
+            else if( i_prio == SUB_PRIORITY_NONE &&
                 j == 0 )
             {
                 /* doesn't contain the movie name, prefer files in f_dir over subdirs */



More information about the vlc-commits mailing list