[Mesa-dev] [PATCH 1/2] egl/haiku: Correct invalid void* conversion in calloc
kallisti5
kallisti5 at unixzen.com
Mon Nov 13 22:25:40 UTC 2017
On 2017-11-13 09:41, Brian Paul wrote:
> On 11/12/2017 02:53 PM, Alexander von Gluck IV wrote:
>> ---
>> 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;
>>
>
> For both, Reviewed-by: Brian Paul <brianp at vmware.com>
>
> Do you need me to push these for you?
Nah, I have access.
Thanks!
-- Alex
More information about the mesa-dev
mailing list