egl: fold _eglError() + return EGL_FALSE
The function _eglError() already explicitly returns EGL_FALSE, explicitly to simplify the callers. Make use of it. While EGL_FALSE is numerically identical to false, NULL, EGL_NO_FOO, storage is not the same so we cannot use it for "everything". Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:

committed by
Emil Velikov

parent
d42b09580a
commit
c58af5cbb2
@@ -150,10 +150,8 @@ haiku_add_configs_for_visuals(_EGLDisplay *dpy)
|
||||
|
||||
struct haiku_egl_config* conf;
|
||||
conf = (struct haiku_egl_config*) calloc(1, sizeof (*conf));
|
||||
if (!conf) {
|
||||
_eglError(EGL_BAD_ALLOC, "haiku_add_configs_for_visuals");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
if (!conf)
|
||||
return _eglError(EGL_BAD_ALLOC, "haiku_add_configs_for_visuals");
|
||||
|
||||
_eglInitConfig(&conf->base, dpy, 1);
|
||||
TRACE("Config inited\n");
|
||||
|
Reference in New Issue
Block a user