summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 6eeaa35eb63..7aaab3c2c94 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -495,12 +495,10 @@ _eglParseX11DisplayAttribList(_EGLDisplay *display, const EGLint *attrib_list)
/* EGL_EXT_platform_x11 recognizes exactly one attribute,
* EGL_PLATFORM_X11_SCREEN_EXT, which is optional.
*/
- if (attrib == EGL_PLATFORM_X11_SCREEN_EXT) {
- display->Options.Platform = (void *)(uintptr_t)value;
- } else {
- _eglError(EGL_BAD_ATTRIBUTE, "eglGetPlatformDisplay");
- return EGL_FALSE;
- }
+ if (attrib != EGL_PLATFORM_X11_SCREEN_EXT)
+ return _eglError(EGL_BAD_ATTRIBUTE, "eglGetPlatformDisplay");
+
+ display->Options.Platform = (void *)(uintptr_t)value;
}
return EGL_TRUE;