From: Emil Velikov <[email protected]>

The name string is guaranteed to be NULL terminated. Drop the explicit
length check that comes with strncmp().

Cc: Robert Foss <[email protected]>
Cc: Tomasz Figa <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
---
 src/egl/drivers/dri2/platform_android.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/platform_android.c 
b/src/egl/drivers/dri2/platform_android.c
index 685851acfc2..bea06fd55dd 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -1269,7 +1269,7 @@ droid_probe_device(_EGLDisplay *disp, int fd, const char 
*vendor)
       goto cleanup;
    }
 
-   if (vendor && strncmp(vendor, ver->name, PROPERTY_VALUE_MAX) != 0) {
+   if (vendor && strcmp(vendor, ver->name) != 0) {
       ret = probe_filtered_out;
       goto cleanup;
    }
-- 
2.18.0

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to