test: correct argument order for calloc()
authorStefan Schmidt <stefan@osg.samsung.com>
Mon, 30 Nov 2015 20:57:58 +0000 (21:57 +0100)
committerStefan Schmidt <stefan@osg.samsung.com>
Mon, 30 Nov 2015 20:57:58 +0000 (21:57 +0100)
calloc() expects count first and the actual size to allocate as second
argument. Say Thank You to smatch for finding this issues for us.

legacy/elementary/src/bin/test.c

index c1539d5..cb602f7 100644 (file)
@@ -388,7 +388,7 @@ _space_removed_string_get(const char *name)
    char *ret;
 
    len = strlen(name);
-   ret = calloc(sizeof(char), len + 1);
+   ret = calloc(len + 1, sizeof(char));
 
    while (name[i])
      {