summaryrefslogtreecommitdiff
path: root/src/lib/ecore_sdl
diff options
context:
space:
mode:
authorDuna Oh <duna.oh@samsung.com>2016-04-20 08:33:20 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-04-20 08:33:20 -0400
commitfbe4e4b6adcd1fadb22aa838836254673e2bbb86 (patch)
tree56390f69044fd6e44dc1513a7b51fa900036b49f /src/lib/ecore_sdl
parent115b69fd479a08db2e8b401f28aa6867179e5de3 (diff)
Ecore: Use calloc() to initialize Ecore_Event_Mouse_XXXX
Summary: To ensure initialize all fields of Ecore_Event_Mouse_XXX, use calloc() instead of malloc(). Test Plan: N/A Reviewers: gwanglim, cedric, raster, devilhorns, ManMower, zmike Subscribers: jpeg, input.hacker, JHyun Differential Revision: https://phab.enlightenment.org/D3906
Diffstat (limited to 'src/lib/ecore_sdl')
-rw-r--r--src/lib/ecore_sdl/ecore_sdl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ecore_sdl/ecore_sdl.c b/src/lib/ecore_sdl/ecore_sdl.c
index ff026f5702..2fee26ce50 100644
--- a/src/lib/ecore_sdl/ecore_sdl.c
+++ b/src/lib/ecore_sdl/ecore_sdl.c
@@ -167,7 +167,7 @@ ecore_sdl_feed_events(void)
167 { 167 {
168 Ecore_Event_Mouse_Move *ev; 168 Ecore_Event_Mouse_Move *ev;
169 169
170 ev = malloc(sizeof(Ecore_Event_Mouse_Move)); 170 ev = calloc(1, sizeof(Ecore_Event_Mouse_Move));
171 if (!ev) return; 171 if (!ev) return;
172 172
173 ev->timestamp = timestamp; 173 ev->timestamp = timestamp;
@@ -192,7 +192,7 @@ ecore_sdl_feed_events(void)
192 { 192 {
193 Ecore_Event_Mouse_Button *ev; 193 Ecore_Event_Mouse_Button *ev;
194 194
195 ev = malloc(sizeof(Ecore_Event_Mouse_Button)); 195 ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
196 if (!ev) return; 196 if (!ev) return;
197 197
198 ev->timestamp = timestamp; 198 ev->timestamp = timestamp;
@@ -216,7 +216,7 @@ ecore_sdl_feed_events(void)
216 { 216 {
217 Ecore_Event_Mouse_Wheel *ev; 217 Ecore_Event_Mouse_Wheel *ev;
218 218
219 ev = malloc(sizeof(Ecore_Event_Mouse_Wheel)); 219 ev = calloc(1, sizeof(Ecore_Event_Mouse_Wheel));
220 if (!ev) return; 220 if (!ev) return;
221 221
222 ev->timestamp = timestamp; 222 ev->timestamp = timestamp;
@@ -234,7 +234,7 @@ ecore_sdl_feed_events(void)
234 { 234 {
235 Ecore_Event_Mouse_Button *ev; 235 Ecore_Event_Mouse_Button *ev;
236 236
237 ev = malloc(sizeof(Ecore_Event_Mouse_Button)); 237 ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
238 if (!ev) return; 238 if (!ev) return;
239 ev->timestamp = timestamp; 239 ev->timestamp = timestamp;
240 ev->window = event.button.windowID; 240 ev->window = event.button.windowID;