summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-11-30 21:57:58 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-11-30 21:57:58 +0100
commit37536054042df43b1756a98231ca5253c799f057 (patch)
tree0de13b398476dddcd244a58c4840ca1560c4e3b7
parent243dfb008d4b19d446ae4a3f8e2b7d2dd7fb04c2 (diff)
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.c2
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)
388 char *ret; 388 char *ret;
389 389
390 len = strlen(name); 390 len = strlen(name);
391 ret = calloc(sizeof(char), len + 1); 391 ret = calloc(len + 1, sizeof(char));
392 392
393 while (name[i]) 393 while (name[i])
394 { 394 {