[PATCH weston 5/9] clients/nested: use weston_check_extension over strstr

Emil Velikov emil.l.velikov at gmail.com
Mon Jul 4 14:34:20 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 clients/nested.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clients/nested.c b/clients/nested.c
index 6c21aa4..9f74326 100644
--- a/clients/nested.c
+++ b/clients/nested.c
@@ -748,7 +748,7 @@ nested_init_compositor(struct nested *nested)
 
 	nested->egl_display = display_get_egl_display(nested->display);
 	extensions = eglQueryString(nested->egl_display, EGL_EXTENSIONS);
-	if (strstr(extensions, "EGL_WL_bind_wayland_display") == NULL) {
+	if (weston_check_extension(extensions, "EGL_WL_bind_wayland_display") == NULL) {
 		fprintf(stderr, "no EGL_WL_bind_wayland_display extension\n");
 		return -1;
 	}
@@ -771,7 +771,7 @@ nested_init_compositor(struct nested *nested)
 		const char *func = "eglCreateWaylandBufferFromImageWL";
 		const char *ext = "EGL_WL_create_wayland_buffer_from_image";
 
-		if (strstr(extensions, ext)) {
+		if (weston_check_extension(extensions, ext)) {
 			create_wayland_buffer_from_image =
 				(void *) eglGetProcAddress(func);
 			use_ss_renderer = 1;
-- 
2.8.2



More information about the wayland-devel mailing list