projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a4c2a9
)
test: correct argument order for calloc()
author
Stefan Schmidt
<stefan@osg.samsung.com>
Mon, 30 Nov 2015 20:57:58 +0000
(21:57 +0100)
committer
Stefan 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
patch
|
blob
|
history
diff --git
a/legacy/elementary/src/bin/test.c
b/legacy/elementary/src/bin/test.c
index
c1539d5
..
cb602f7
100644
(file)
--- a/
legacy/elementary/src/bin/test.c
+++ b/
legacy/elementary/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])
{