[PATCH weston 1/3] simple-egl: move function call out of assert()

Pekka Paalanen ppaalanen at gmail.com
Tue Jun 12 07:42:24 PDT 2012


On Android, we have NDEBUG defined by the build system.

Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 clients/simple-egl.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index 5dd44f9..4cb5bc7 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -122,8 +122,9 @@ init_egl(struct display *display, EGLint alpha_size)
 	ret = eglBindAPI(EGL_OPENGL_ES_API);
 	assert(ret == EGL_TRUE);
 
-	assert(eglChooseConfig(display->egl.dpy, config_attribs,
-			       &display->egl.conf, 1, &n) && n == 1);
+	ret = eglChooseConfig(display->egl.dpy, config_attribs,
+			      &display->egl.conf, 1, &n);
+	assert(ret && n == 1);
 
 	display->egl.ctx = eglCreateContext(display->egl.dpy,
 					    display->egl.conf,
-- 
1.7.3.4



More information about the wayland-devel mailing list