[vlc-commits] android: util: remove redundant strncmp
Alexandre Janniaux
git at videolan.org
Thu Feb 13 12:03:38 CET 2020
vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Thu Feb 6 15:19:42 2020 +0100| [77aa424b72d8b6a1e7049c430c90303b9473ed7d] | committer: Jean-Baptiste Kempf
android: util: remove redundant strncmp
strcmp will already stop at the second string's length and the first
string is known to be null-terminated.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77aa424b72d8b6a1e7049c430c90303b9473ed7d
---
modules/video_output/android/utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/android/utils.c b/modules/video_output/android/utils.c
index 1ca04e829c..40f81f1f99 100644
--- a/modules/video_output/android/utils.c
+++ b/modules/video_output/android/utils.c
@@ -546,8 +546,8 @@ AWindowHandler_new(vout_window_t *wnd, awh_events_t *p_events)
*/
char *vout_modules = var_InheritString(wnd, "vout");
if (vout_modules
- && (strncmp(vout_modules, "gles2", sizeof("gles2") - 1) == 0
- || strncmp(vout_modules, "opengles2", sizeof("opengles2") - 1) == 0))
+ && (strcmp(vout_modules, "gles2") == 0
+ || strcmp(vout_modules, "opengles2") == 0))
p_awh->b_has_video_layout_listener = false;
free(vout_modules);
}
More information about the vlc-commits
mailing list