[vlc-commits] subtitles: Remove unneeded clauses.

Hugo Beauzée-Luyssen git at videolan.org
Wed Apr 11 19:12:25 CEST 2012


vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Apr 10 15:39:09 2012 +0200| [9777ead16c80cee7a42f3efbf6ab45e6b6af33b7] | committer: Jean-Baptiste Kempf

subtitles: Remove unneeded clauses.
(cherry picked from commit f97effab97f11c8b187e4734b452fd88a92fa713)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 f7222c1..e0c468d 100644
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -338,13 +338,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 );
@@ -360,7 +359,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