From: Eric Engestrom Date: Thu, 10 Jan 2019 16:41:38 +0000 (+0000) Subject: egl: remove unnecessary eglGetProcAddress() fallback X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=82487ede625bb621c63a088b4decfdefadbeb793;p=mesa.git egl: remove unnecessary eglGetProcAddress() fallback No need to add a function that returns `false` only to be cast into a pointer, we can just use the existing `return NULL` :) Signed-off-by: Eric Engestrom Reviewed-by: Tapani Pälli Reviewed-by: Emil Velikov --- diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index e294c8c5f7d..4dc46b35e95 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -109,7 +109,7 @@ _eglMatchDriver(_EGLDisplay *disp) __eglMustCastToProperFunctionPointerType _eglGetDriverProc(const char *procname) { - if (_eglGetDriver()) + if (_eglGetDriver() && _eglDriver->API.GetProcAddress) return _eglDriver->API.GetProcAddress(_eglDriver, procname); return NULL; diff --git a/src/egl/main/eglfallbacks.c b/src/egl/main/eglfallbacks.c index bf667af1124..336ca7aee2e 100644 --- a/src/egl/main/eglfallbacks.c +++ b/src/egl/main/eglfallbacks.c @@ -76,7 +76,6 @@ _eglInitDriverFallbacks(_EGLDriver *drv) drv->API.WaitClient = (void*) _eglReturnFalse; drv->API.WaitNative = (void*) _eglReturnFalse; - drv->API.GetProcAddress = (void*) _eglReturnFalse; drv->API.GetSyncAttrib = _eglGetSyncAttrib; }