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 <eric@engestrom.ch> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6037>
This commit is contained in:

committed by
Marge Bot

parent
f91851e615
commit
a77050c034
@@ -61,7 +61,7 @@ _eglMatchAndInitialize(_EGLDisplay *disp)
|
|||||||
* Match a display to a driver. The matching is done by finding the first
|
* Match a display to a driver. The matching is done by finding the first
|
||||||
* driver that can initialize the display.
|
* driver that can initialize the display.
|
||||||
*/
|
*/
|
||||||
_EGLDriver *
|
bool
|
||||||
_eglMatchDriver(_EGLDisplay *disp)
|
_eglMatchDriver(_EGLDisplay *disp)
|
||||||
{
|
{
|
||||||
_EGLDriver *best_drv;
|
_EGLDriver *best_drv;
|
||||||
@@ -85,7 +85,7 @@ _eglMatchDriver(_EGLDisplay *disp)
|
|||||||
disp->Initialized = EGL_TRUE;
|
disp->Initialized = EGL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return best_drv;
|
return best_drv != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
__eglMustCastToProperFunctionPointerType
|
__eglMustCastToProperFunctionPointerType
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "c99_compat.h"
|
#include "c99_compat.h"
|
||||||
|
|
||||||
#include "egltypedefs.h"
|
#include "egltypedefs.h"
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -223,7 +224,7 @@ struct _egl_driver
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern _EGLDriver *
|
extern bool
|
||||||
_eglMatchDriver(_EGLDisplay *disp);
|
_eglMatchDriver(_EGLDisplay *disp);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user