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)
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
2476 const char *key, *value; 2476 const char *key, *value;
2477 if (eldbus_message_iter_arguments_get(iter_arg, "ss", &key, &value)) 2477 if (eldbus_message_iter_arguments_get(iter_arg, "ss", &key, &value))
2478 { 2478 {
2479 Elm_Atspi_Attribute *attrib = calloc(sizeof(Elm_Atspi_Attribute), 1); 2479 Elm_Atspi_Attribute *attrib = calloc(1, sizeof(Elm_Atspi_Attribute));
2480 attrib->key = eina_stringshare_add(key); 2480 attrib->key = eina_stringshare_add(key);
2481 attrib->value = eina_stringshare_add(value); 2481 attrib->value = eina_stringshare_add(value);
2482 rule->attributes = eina_list_append(rule->attributes, attrib); 2482 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)
4471 Key_Event_Info *ret; 4471 Key_Event_Info *ret;
4472 EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL); 4472 EINA_SAFETY_ON_NULL_RETURN_VAL(data, NULL);
4473 4473
4474 ret = calloc(sizeof(Key_Event_Info), 1); 4474 ret = calloc(1, sizeof(Key_Event_Info));
4475 4475
4476 ret->type = event_type; 4476 ret->type = event_type;
4477 ret->event = *data; 4477 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_
331EOLIAN Elm_Atspi_Event_Handler * 331EOLIAN Elm_Atspi_Event_Handler *
332_elm_interface_atspi_accessible_event_handler_add(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Eo_Event_Cb cb, void *data) 332_elm_interface_atspi_accessible_event_handler_add(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Eo_Event_Cb cb, void *data)
333{ 333{
334 Elm_Atspi_Event_Handler *ret = calloc(sizeof(Elm_Atspi_Event_Handler), 1); 334 Elm_Atspi_Event_Handler *ret = calloc(1, sizeof(Elm_Atspi_Event_Handler));
335 335
336 ret->cb = cb; 336 ret->cb = cb;
337 ret->data = data; 337 ret->data = data;
@@ -380,7 +380,7 @@ elm_atspi_relation_free(Elm_Atspi_Relation *relation)
380EAPI Elm_Atspi_Relation * 380EAPI Elm_Atspi_Relation *
381elm_atspi_relation_clone(const Elm_Atspi_Relation *relation) 381elm_atspi_relation_clone(const Elm_Atspi_Relation *relation)
382{ 382{
383 Elm_Atspi_Relation *ret = calloc(sizeof(Elm_Atspi_Relation), 1); 383 Elm_Atspi_Relation *ret = calloc(1, sizeof(Elm_Atspi_Relation));
384 if (!ret) return NULL; 384 if (!ret) return NULL;
385 385
386 ret->type = relation->type; 386 ret->type = relation->type;
@@ -434,7 +434,7 @@ elm_atspi_relation_set_relation_append(Elm_Atspi_Relation_Set *set, Elm_Atspi_Re
434 } 434 }
435 } 435 }
436 436
437 rel = calloc(sizeof(Elm_Atspi_Relation), 1); 437 rel = calloc(1, sizeof(Elm_Atspi_Relation));
438 if (!rel) return EINA_FALSE; 438 if (!rel) return EINA_FALSE;
439 439
440 rel->type = type; 440 rel->type = type;