forked from enlightenment/efl
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.
This commit is contained in:
parent
e0148bb076
commit
d4e5c76b11
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue