aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--liberty-xui.c4
-rw-r--r--liberty.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/liberty-xui.c b/liberty-xui.c
index 083f14b..3f193b5 100644
--- a/liberty-xui.c
+++ b/liberty-xui.c
@@ -205,8 +205,8 @@ static void
line_editor_start (struct line_editor *self, char prompt)
{
self->alloc = 16;
- self->line = xcalloc (sizeof *self->line, self->alloc);
- self->w = xcalloc (sizeof *self->w, self->alloc);
+ self->line = xcalloc (self->alloc, sizeof *self->line);
+ self->w = xcalloc (self->alloc, sizeof *self->w);
self->len = 0;
self->point = 0;
self->prompt = prompt;
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;
}