eina: fix calloc() parameters order in eina_share.
authorJean Guyomarc'h <jean.guyomarch@gmail.com>
Fri, 14 Nov 2014 05:49:54 +0000 (06:49 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 14 Nov 2014 05:49:59 +0000 (06:49 +0100)
Summary: The first parameter must be the count of elements to be allocated.

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1660

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/eina/eina_share_common.c

index 0907ea1..33142dc 100644 (file)
@@ -607,7 +607,7 @@ eina_share_common_init(Eina_Share **_share,
 {
    Eina_Share *share;
 
-   share = *_share = calloc(sizeof(Eina_Share), 1);
+   share = *_share = calloc(1, sizeof(Eina_Share));
    if (!share) goto on_error;
 
    share->share = calloc(1, sizeof(Eina_Share_Common));