aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-30 17:20:21 +0200
committerDavid Robillard <d@drobilla.net>2018-09-30 17:20:21 +0200
commitf0bc2210cdcbb0d641e3a723ca23409afe615535 (patch)
tree98ac3edb553ef013096d204f633089a2e7af7744 /src/node.c
parenta5b040e33d00a8d6eab1ba8167f5ccaecbbfbc75 (diff)
downloadserd-f0bc2210cdcbb0d641e3a723ca23409afe615535.tar.gz
serd-f0bc2210cdcbb0d641e3a723ca23409afe615535.tar.bz2
serd-f0bc2210cdcbb0d641e3a723ca23409afe615535.zip
Fix calloc argument order
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node.c b/src/node.c
index 655da1d1..92bf3bde 100644
--- a/src/node.c
+++ b/src/node.c
@@ -360,7 +360,7 @@ SerdNode
serd_node_new_blob(const void* buf, size_t size, bool wrap_lines)
{
const size_t len = (size + 2) / 3 * 4 + (wrap_lines * ((size - 1) / 57));
- uint8_t* str = (uint8_t*)calloc(1, len + 2);
+ uint8_t* str = (uint8_t*)calloc(len + 2, 1);
SerdNode node = { str, len, len, 0, SERD_LITERAL };
for (size_t i = 0, j = 0; i < size; i += 3, j += 4) {
uint8_t in[4] = { 0, 0, 0, 0 };