summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-07-04 15:34:19 +0100
committerDaniel Stone <daniels@collabora.com>2016-07-22 15:28:45 +0100
commitd0fcdc955e0f2242d6f4bd0250efd905cc399279 (patch)
treeca76a5ca35ff54e2b82d7b0ce2752fdeb6bd32c7 /shared
parentf0c3a1c112f41b69adf7e90513e4e7d3345f9765 (diff)
downloadweston-d0fcdc955e0f2242d6f4bd0250efd905cc399279.tar.gz
weston-d0fcdc955e0f2242d6f4bd0250efd905cc399279.tar.bz2
weston-d0fcdc955e0f2242d6f4bd0250efd905cc399279.zip
shared/platform.h: use weston_check_egl_extension over strstr
The later can give false positives. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'shared')
-rw-r--r--shared/platform.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/platform.h b/shared/platform.h
index 77c82599..e0ed55bc 100644
--- a/shared/platform.h
+++ b/shared/platform.h
@@ -88,9 +88,9 @@ weston_platform_get_egl_proc_address(const char *address)
{
const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
- if (extensions
- && (strstr(extensions, "EGL_EXT_platform_wayland")
- || strstr(extensions, "EGL_KHR_platform_wayland"))) {
+ if (extensions &&
+ (weston_check_egl_extension(extensions, "EGL_EXT_platform_wayland") ||
+ weston_check_egl_extension(extensions, "EGL_KHR_platform_wayland"))) {
return (void *) eglGetProcAddress(address);
}