aboutsummaryrefslogtreecommitdiff
path: root/liberty.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-08-08 09:34:33 +0200
committerPřemysl Eric Janouch <p@janouch.name>2024-08-08 09:34:33 +0200
commit49d7cb12bb2f47216528ea6d6f58869e0cf12a2e (patch)
treeb4b876e6b6487e02c136e7fa7870db4fbda3733c /liberty.c
parentfdf845d0bd6ddde585bc16900f89f63f3ef1880b (diff)
downloadliberty-49d7cb12bb2f47216528ea6d6f58869e0cf12a2e.tar.gz
liberty-49d7cb12bb2f47216528ea6d6f58869e0cf12a2e.tar.xz
liberty-49d7cb12bb2f47216528ea6d6f58869e0cf12a2e.zip
Fix calloc argument orderHEADorigin/mastermaster
Diffstat (limited to 'liberty.c')
-rw-r--r--liberty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liberty.c b/liberty.c
index e832517..ff7c0c7 100644
--- a/liberty.c
+++ b/liberty.c
@@ -316,7 +316,7 @@ xstrndup (const char *s, size_t n)
#define ARRAY(type, name) type *name; size_t name ## _len, name ## _alloc;
#define ARRAY_INIT_SIZED(a, n) \
BLOCK_START \
- (a) = xcalloc (sizeof *(a), (a ## _alloc) = (n)); \
+ (a) = xcalloc ((a ## _alloc) = (n), sizeof *(a)); \
(a ## _len) = 0; \
BLOCK_END
#define ARRAY_INIT(a) ARRAY_INIT_SIZED (a, 16)
@@ -398,7 +398,7 @@ strv_make (void)
struct strv self;
self.alloc = 4;
self.len = 0;
- self.vector = xcalloc (sizeof *self.vector, self.alloc);
+ self.vector = xcalloc (self.alloc, sizeof *self.vector);
return self;
}