summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
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_wayland
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_wayland')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 4b0845970e..6219a033e2 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -1261,7 +1261,7 @@ _ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win, uns
1261 1261
1262 /* LOGFN(__FILE__, __LINE__, __FUNCTION__); */ 1262 /* LOGFN(__FILE__, __LINE__, __FUNCTION__); */
1263 1263
1264 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; 1264 if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
1265 1265
1266 ev->timestamp = timestamp; 1266 ev->timestamp = timestamp;
1267 ev->x = input->sx; 1267 ev->x = input->sx;
@@ -1379,7 +1379,7 @@ _ecore_wl_input_mouse_down_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win, int
1379 1379
1380 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1380 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1381 1381
1382 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; 1382 if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
1383 1383
1384 if (button == BTN_LEFT) 1384 if (button == BTN_LEFT)
1385 ev->buttons = 1; 1385 ev->buttons = 1;
@@ -1488,7 +1488,7 @@ _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win, int d
1488 1488
1489 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1489 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1490 1490
1491 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; 1491 if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
1492 1492
1493 if (button == BTN_LEFT) 1493 if (button == BTN_LEFT)
1494 ev->buttons = 1; 1494 ev->buttons = 1;
@@ -1551,7 +1551,7 @@ _ecore_wl_input_mouse_wheel_send(Ecore_Wl_Input *input, unsigned int axis, int v
1551 1551
1552 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1552 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1553 1553
1554 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Wheel)))) return; 1554 if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Wheel)))) return;
1555 1555
1556 ev->timestamp = timestamp; 1556 ev->timestamp = timestamp;
1557 ev->modifiers = input->modifiers; 1557 ev->modifiers = input->modifiers;