summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-11-30 15:15:52 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-11-30 16:24:58 +0100
commit0c02f97facf1aba977f197964ac95c6b55e7f417 (patch)
tree0b2412183c4edb9364d68241c669ba46a9e34275
parent23dc11debca551b35aabcb475420cd3e29df38e5 (diff)
downloadelementary-0c02f97facf1aba977f197964ac95c6b55e7f417.tar.gz
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.
-rw-r--r--src/lib/elm_atspi_bridge.c4
-rw-r--r--src/lib/elm_interface_atspi_accessible.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c
index 6b0872877..f0eec7db2 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 3e3d8c123..2a38380c8 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;