[vlc-commits] subtitle: Don't call strcasestr twice
Hugo Beauzée-Luyssen
git at videolan.org
Mon Jun 26 13:27:01 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Jun 26 10:28:27 2017 +0200| [62e7a6c457a5b2f5d92199c176cdae84837a2356] | committer: Hugo Beauzée-Luyssen
subtitle: Don't call strcasestr twice
refs CID #1446911
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62e7a6c457a5b2f5d92199c176cdae84837a2356
---
modules/demux/subtitle.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index 9726bc26bb..d2f3e9d0b4 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -1260,11 +1260,9 @@ static char *ParseSamiSearch( text_t *txt,
if( !p )
return NULL;
- if( strcasestr( p, psz_str ) )
- {
- char *s = strcasestr( p, psz_str );
+ char *s = strcasestr( p, psz_str );
+ if( s != NULL )
return &s[strlen( psz_str )];
- }
}
}
static int ParseSami( vlc_object_t *p_obj, subs_properties_t *p_props,
More information about the vlc-commits
mailing list