From 084e964286bfcd13ee6a25a2ee35dfba9da1072e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Mon, 23 Jan 2017 23:14:04 +0100 Subject: Fixes to the previous batch of commits --- liberty-tui.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'liberty-tui.c') diff --git a/liberty-tui.c b/liberty-tui.c index 4d48c2a..7cc9bfb 100644 --- a/liberty-tui.c +++ b/liberty-tui.c @@ -194,9 +194,7 @@ row_buffer_space (struct row_buffer *self, int width, chtype attrs) if (width < 0) return; - while (self->chars_len + width >= self->chars_alloc) - self->chars = xreallocarray (self->chars, - sizeof *self->chars, (self->chars_alloc <<= 1)); + ARRAY_RESERVE (self->chars, (size_t) width); struct row_char space = { .attrs = attrs, .c = ' ', .width = 1 }; self->total_width += width; -- cgit v1.2.3