egl/haiku: Correct invalid void* conversion in calloc
authorAlexander von Gluck IV <kallisti5@unixzen.com>
Sun, 12 Nov 2017 04:20:03 +0000 (22:20 -0600)
committerAlexander von Gluck IV <kallisti5@unixzen.com>
Mon, 13 Nov 2017 22:45:10 +0000 (16:45 -0600)
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/egl/drivers/haiku/egl_haiku.cpp

index 237cebf056e8945d724e937807ea01f8805c8e27..287760661e5c4e3402f1fd193eff351ea7c9e1e9 100644 (file)
@@ -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;