evas-gl_cocoa: cleanup eng_info

This commit is contained in:
Jean Guyomarc'h 2016-08-24 10:24:49 +02:00 committed by Jean Guyomarc'h
parent 62c342c4e3
commit f4f94a9f79
1 changed files with 8 additions and 6 deletions

View File

@ -71,9 +71,13 @@ static void *
eng_info(Evas *e EINA_UNUSED)
{
Evas_Engine_Info_GL_Cocoa *info;
info = calloc(1, sizeof(Evas_Engine_Info_GL_Cocoa));
DBG("Info %p", info);
if (!info) return NULL;
info = calloc(1, sizeof(*info));
if (EINA_UNLIKELY(!info))
{
CRI("Faield to allocate memory");
return NULL;
}
info->magic.magic = rand();
return info;
}
@ -81,9 +85,7 @@ eng_info(Evas *e EINA_UNUSED)
static void
eng_info_free(Evas *e EINA_UNUSED, void *info)
{
Evas_Engine_Info_GL_Cocoa *in;
in = (Evas_Engine_Info_GL_Cocoa *)info;
Evas_Engine_Info_GL_Cocoa *const in = info;
free(in);
}