egl/android: use strcmp with drmVersion::name
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 8 Aug 2018 13:56:00 +0000 (14:56 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 24 Aug 2018 10:52:37 +0000 (11:52 +0100)
The name string is guaranteed to be NULL terminated. Drop the explicit
length check that comes with strncmp().

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
src/egl/drivers/dri2/platform_android.c

index 9877c49fdd92f413c52592f612f3f10d68de68a5..ee6c2791b18854cf8e3d1e8f846a26122ff435bc 100644 (file)
@@ -1437,7 +1437,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;
    }