[Mesa-dev] [PATCH 1/2] egl/haiku: Correct invalid void* conversion in calloc
Eric Engestrom
eric.engestrom at imgtec.com
Mon Nov 13 16:39:58 UTC 2017
On Sunday, 2017-11-12 15:53:57 -0600, Alexander von Gluck IV wrote:
> ---
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
and this reminds me that I haven't re-sent the patch that removes all that
code, so I'll do that, but this patch is still good in the mean time :)
> src/egl/drivers/haiku/egl_haiku.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp
> index 237cebf056..287760661e 100644
> --- a/src/egl/drivers/haiku/egl_haiku.cpp
> +++ b/src/egl/drivers/haiku/egl_haiku.cpp
> @@ -313,7 +313,8 @@ _eglBuiltInDriver(void)
> {
> CALLED();
>
> - _EGLDriver* driver = calloc(1, sizeof(*driver));
> + _EGLDriver* driver;
> + driver = (_EGLDriver*) calloc(1, sizeof(*driver));
> if (!driver) {
> _eglError(EGL_BAD_ALLOC, "_eglBuiltInDriverHaiku");
> return NULL;
> --
> 2.13.6
>
More information about the mesa-dev
mailing list