From 82487ede625bb621c63a088b4decfdefadbeb793 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 10 Jan 2019 16:41:38 +0000 Subject: [PATCH] egl: remove unnecessary eglGetProcAddress() fallback MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/egl/main/egldriver.c | 2 +- src/egl/main/eglfallbacks.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.30.2