egl: Make resource void pointer in _eglCheckResource.
[mesa.git] / src / egl / main / eglsurface.h
index da07133c2c1e95368586d18fb9dc0c96f091a924..f1642356b0b173f9fd7143afd1dfaaeae76466ed 100644 (file)
@@ -141,9 +141,8 @@ _eglUnlinkSurface(_EGLSurface *surf)
 static INLINE _EGLSurface *
 _eglLookupSurface(EGLSurface surface, _EGLDisplay *dpy)
 {
-   _EGLResource *res = (_EGLResource *) surface;
    _EGLSurface *surf = (_EGLSurface *) surface;
-   if (!res || !dpy || !_eglCheckResource(res, _EGL_RESOURCE_SURFACE, dpy))
+   if (!dpy || !_eglCheckResource((void *) surf, _EGL_RESOURCE_SURFACE, dpy))
       surf = NULL;
    return surf;
 }