Module: Mesa
Branch: master
Commit: f09e001a05cbd1b0cbda6b5a8ff5731b6d612c22
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f09e001a05cbd1b0cbda6b5a8ff5731b6d612c22

Author: Alexander von Gluck IV <[email protected]>
Date:   Sat Nov 11 22:20:03 2017 -0600

egl/haiku: Correct invalid void* conversion in calloc

Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>

---

 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;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to