diff options
author | Stefan Schmidt <stefan@osg.samsung.com> | 2015-11-30 21:57:58 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-11-30 21:57:58 +0100 |
commit | 37536054042df43b1756a98231ca5253c799f057 (patch) | |
tree | 0de13b398476dddcd244a58c4840ca1560c4e3b7 | |
parent | 243dfb008d4b19d446ae4a3f8e2b7d2dd7fb04c2 (diff) | |
download | elementary-37536054042df43b1756a98231ca5253c799f057.tar.gz |
test: 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/bin/test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/test.c b/src/bin/test.c index c1539d50a..cb602f734 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -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]) { |