Module: Mesa
Branch: master
Commit: bf66988b08786c123804c2be8846a6a21cf200ad
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf66988b08786c123804c2be8846a6a21cf200ad

Author: Emil Velikov <[email protected]>
Date:   Wed Jul 29 17:19:03 2015 +0100

egl/x11: remove dri2_dpy->conn checks

If the connection is NULL we won't be able to get here.

Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>

---

 src/egl/drivers/dri2/platform_x11.c |   18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_x11.c 
b/src/egl/drivers/dri2/platform_x11.c
index 7a28318..92e733a 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1227,10 +1227,8 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay 
*disp)
       goto cleanup_dpy;
    }
 
-   if (dri2_dpy->conn) {
-      if (!dri2_x11_connect(dri2_dpy))
-        goto cleanup_conn;
-   }
+   if (!dri2_x11_connect(dri2_dpy))
+      goto cleanup_conn;
 
    if (!dri2_load_driver(disp))
       goto cleanup_conn;
@@ -1243,10 +1241,8 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay 
*disp)
       goto cleanup_driver;
    }
 
-   if (dri2_dpy->conn) {
-      if (!dri2_x11_local_authenticate(disp))
-        goto cleanup_fd;
-   }
+   if (!dri2_x11_local_authenticate(disp))
+      goto cleanup_fd;
 
    if (dri2_dpy->dri2_minor >= 1) {
       dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
@@ -1285,10 +1281,8 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay 
*disp)
    disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
 #endif
 
-   if (dri2_dpy->conn) {
-      if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp))
-        goto cleanup_configs;
-   }
+   if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp))
+      goto cleanup_configs;
 
    /* Fill vtbl last to prevent accidentally calling virtual function during
     * initialization.

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to