summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>2016-08-24 10:24:49 +0200
committerJean Guyomarc'h <jean@guyomarch.bzh>2016-08-25 21:41:17 +0200
commitf4f94a9f7965e26dc41e18db974184fab6e8a339 (patch)
tree03c36bceb7730c1b92cde8cc4441e7189b4ee400 /src
parent62c342c4e3ff1459849fc47ef44ecc67eb7b9a32 (diff)
evas-gl_cocoa: cleanup eng_info
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_cocoa/evas_engine.c14
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 87f275c..0cded43 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 *
71eng_info(Evas *e EINA_UNUSED) 71eng_info(Evas *e EINA_UNUSED)
72{ 72{
73 Evas_Engine_Info_GL_Cocoa *info; 73 Evas_Engine_Info_GL_Cocoa *info;
74 info = calloc(1, sizeof(Evas_Engine_Info_GL_Cocoa)); 74
75 DBG("Info %p", info); 75 info = calloc(1, sizeof(*info));
76 if (!info) return NULL; 76 if (EINA_UNLIKELY(!info))
77 {
78 CRI("Faield to allocate memory");
79 return NULL;
80 }
77 info->magic.magic = rand(); 81 info->magic.magic = rand();
78 return info; 82 return info;
79} 83}
@@ -81,9 +85,7 @@ eng_info(Evas *e EINA_UNUSED)
81static void 85static void
82eng_info_free(Evas *e EINA_UNUSED, void *info) 86eng_info_free(Evas *e EINA_UNUSED, void *info)
83{ 87{
84 Evas_Engine_Info_GL_Cocoa *in; 88 Evas_Engine_Info_GL_Cocoa *const in = info;
85
86 in = (Evas_Engine_Info_GL_Cocoa *)info;
87 free(in); 89 free(in);
88} 90}
89 91