stefan pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=0c02f97facf1aba977f197964ac95c6b55e7f417

commit 0c02f97facf1aba977f197964ac95c6b55e7f417
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Mon Nov 30 15:15:52 2015 +0100

    atspi: correct argument order for calloc()
    
    calloc() expects count first and the actual size to allocate as second
    argument. Say Thank You to smatch for finding this issues for us.
---
 src/lib/elm_atspi_bridge.c               | 4 ++--
 src/lib/elm_interface_atspi_accessible.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c
index 6b08728..f0eec7d 100644
--- a/src/lib/elm_atspi_bridge.c
+++ b/src/lib/elm_atspi_bridge.c
@@ -2476,7 +2476,7 @@ _collection_iter_match_rule_get(Eldbus_Message_Iter 
*iter, struct collection_mat
         const char *key, *value;
         if (eldbus_message_iter_arguments_get(iter_arg, "ss", &key, &value))
           {
-             Elm_Atspi_Attribute *attrib = calloc(sizeof(Elm_Atspi_Attribute), 
1);
+             Elm_Atspi_Attribute *attrib = calloc(1, 
sizeof(Elm_Atspi_Attribute));
              attrib->key = eina_stringshare_add(key);
              attrib->value = eina_stringshare_add(value);
              rule->attributes = eina_list_append(rule->attributes, attrib);
@@ -4471,7 +4471,7 @@ _key_event_info_new(int event_type, const Ecore_Event_Key 
*data, Eo *bridge)
    Key_Event_Info *ret;
    EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);
 
-   ret = calloc(sizeof(Key_Event_Info), 1);
+   ret = calloc(1, sizeof(Key_Event_Info));
 
    ret->type = event_type;
    ret->event = *data;
diff --git a/src/lib/elm_interface_atspi_accessible.c 
b/src/lib/elm_interface_atspi_accessible.c
index 3e3d8c1..2a38380 100644
--- a/src/lib/elm_interface_atspi_accessible.c
+++ b/src/lib/elm_interface_atspi_accessible.c
@@ -331,7 +331,7 @@ _elm_interface_atspi_accessible_event_emit(Eo *class 
EINA_UNUSED, void *pd EINA_
 EOLIAN Elm_Atspi_Event_Handler *
 _elm_interface_atspi_accessible_event_handler_add(Eo *class EINA_UNUSED, void 
*pd EINA_UNUSED, Eo_Event_Cb cb, void *data)
 {
-   Elm_Atspi_Event_Handler *ret = calloc(sizeof(Elm_Atspi_Event_Handler), 1);
+   Elm_Atspi_Event_Handler *ret = calloc(1, sizeof(Elm_Atspi_Event_Handler));
 
    ret->cb = cb;
    ret->data = data;
@@ -380,7 +380,7 @@ elm_atspi_relation_free(Elm_Atspi_Relation *relation)
 EAPI Elm_Atspi_Relation *
 elm_atspi_relation_clone(const Elm_Atspi_Relation *relation)
 {
-   Elm_Atspi_Relation *ret = calloc(sizeof(Elm_Atspi_Relation), 1);
+   Elm_Atspi_Relation *ret = calloc(1, sizeof(Elm_Atspi_Relation));
    if (!ret) return NULL;
 
    ret->type = relation->type;
@@ -434,7 +434,7 @@ 
elm_atspi_relation_set_relation_append(Elm_Atspi_Relation_Set *set, Elm_Atspi_Re
           }
      }
 
-   rel = calloc(sizeof(Elm_Atspi_Relation), 1);
+   rel = calloc(1, sizeof(Elm_Atspi_Relation));
    if (!rel) return EINA_FALSE;
 
    rel->type = type;

-- 


Reply via email to