aboutsummaryrefslogtreecommitdiff
path: root/xC.c
diff options
context:
space:
mode:
Diffstat (limited to 'xC.c')
-rw-r--r--xC.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xC.c b/xC.c
index 85d2e74..df73492 100644
--- a/xC.c
+++ b/xC.c
@@ -1030,7 +1030,7 @@ input_el__save_buffer (struct input_el *self, struct input_el_buffer *buffer)
int len = info->lastchar - info->buffer;
int point = info->cursor - info->buffer;
- wchar_t *line = calloc (sizeof *info->buffer, len + 1);
+ wchar_t *line = xcalloc (len + 1, sizeof *info->buffer);
memcpy (line, info->buffer, sizeof *info->buffer * len);
el_cursor (self->editline, len - point);
el_wdeletestr (self->editline, len);
@@ -1635,7 +1635,7 @@ static struct formatter
formatter_make (struct app_context *ctx, struct server *s)
{
struct formatter self = { .ctx = ctx, .s = s, .clean = true };
- self.items = xcalloc (sizeof *self.items, (self.items_alloc = 16));
+ self.items = xcalloc ((self.items_alloc = 16), sizeof *self.items);
return self;
}
@@ -14757,7 +14757,7 @@ on_editline_return (EditLine *editline, int key)
const LineInfoW *info = el_wline (editline);
int len = info->lastchar - info->buffer;
- wchar_t *line = calloc (sizeof *info->buffer, len + 1);
+ wchar_t *line = xcalloc (len + 1, sizeof *info->buffer);
memcpy (line, info->buffer, sizeof *info->buffer * len);
if (*line)