ecore-wl use calloc for Ecore_Wl_Input allocation instead of malloc+memset
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 12 Mar 2015 19:49:59 +0000 (15:49 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 12 Mar 2015 19:56:46 +0000 (15:56 -0400)
src/lib/ecore_wayland/ecore_wl_input.c

index c91e6b7..ffd382e 100644 (file)
@@ -381,9 +381,7 @@ _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!(input = malloc(sizeof(Ecore_Wl_Input)))) return;
-
-   memset(input, 0, sizeof(Ecore_Wl_Input));
+   if (!(input = calloc(1, sizeof(Ecore_Wl_Input)))) return;
 
    input->display = ewd;
    input->pointer_focus = NULL;