diff options
author | Jean Guyomarc'h <jean.guyomarch@openwide.fr> | 2016-08-24 10:24:49 +0200 |
---|---|---|
committer | Jean Guyomarc'h <jean@guyomarch.bzh> | 2016-08-25 21:41:17 +0200 |
commit | f4f94a9f7965e26dc41e18db974184fab6e8a339 (patch) | |
tree | 03c36bceb7730c1b92cde8cc4441e7189b4ee400 | |
parent | 62c342c4e3ff1459849fc47ef44ecc67eb7b9a32 (diff) | |
download | efl-f4f94a9f7965e26dc41e18db974184fab6e8a339.tar.gz |
evas-gl_cocoa: cleanup eng_info
-rw-r--r-- | src/modules/evas/engines/gl_cocoa/evas_engine.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c b/src/modules/evas/engines/gl_cocoa/evas_engine.c index 87f275c0e6..0cded4392d 100644 --- a/src/modules/evas/engines/gl_cocoa/evas_engine.c +++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c @@ -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); } |