From f91851e6159d9a025aac971b6772ef9904c9d803 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 22 Jul 2020 01:09:56 +0200 Subject: [PATCH] egl: drop unnecessary _eglGetDriver() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Engestrom Reviewed-by: Marcin Ślusarz Reviewed-by: Emil Velikov Part-of: --- src/egl/main/egldriver.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index 2105d83b3da..0a4dae7588e 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -48,18 +48,11 @@ extern _EGLDriver _eglDriver; -static _EGLDriver * -_eglGetDriver(void) -{ - return &_eglDriver; -} - static _EGLDriver * _eglMatchAndInitialize(_EGLDisplay *disp) { - if (_eglGetDriver()) - if (_eglDriver.Initialize(&_eglDriver, disp)) - return &_eglDriver; + if (_eglDriver.Initialize(&_eglDriver, disp)) + return &_eglDriver; return NULL; } @@ -98,7 +91,7 @@ _eglMatchDriver(_EGLDisplay *disp) __eglMustCastToProperFunctionPointerType _eglGetDriverProc(const char *procname) { - if (_eglGetDriver() && _eglDriver.GetProcAddress) + if (_eglDriver.GetProcAddress) return _eglDriver.GetProcAddress(&_eglDriver, procname); return NULL; -- 2.30.2