From: Eric Engestrom Date: Tue, 21 Jul 2020 22:51:51 +0000 (+0200) Subject: egl: fix _eglMatchDriver() return type X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=a77050c03459689f8ea59e51da31c954006ce6ae egl: fix _eglMatchDriver() return type The one caller only ever checks if the return value is NULL or not, so let's simplify the function by only returning that information. Signed-off-by: Eric Engestrom Reviewed-by: Marcin Ĺšlusarz Reviewed-by: Emil Velikov Part-of: --- diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index 0a4dae7588e..e6d50984727 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -61,7 +61,7 @@ _eglMatchAndInitialize(_EGLDisplay *disp) * Match a display to a driver. The matching is done by finding the first * driver that can initialize the display. */ -_EGLDriver * +bool _eglMatchDriver(_EGLDisplay *disp) { _EGLDriver *best_drv; @@ -85,7 +85,7 @@ _eglMatchDriver(_EGLDisplay *disp) disp->Initialized = EGL_TRUE; } - return best_drv; + return best_drv != NULL; } __eglMustCastToProperFunctionPointerType diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index 51390332157..0d0f50726b1 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -35,6 +35,7 @@ #include "c99_compat.h" #include "egltypedefs.h" +#include #include @@ -223,7 +224,7 @@ struct _egl_driver }; -extern _EGLDriver * +extern bool _eglMatchDriver(_EGLDisplay *disp);