From bf534010cb6163bd6ebdef132ee62cccb2b2c9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Thu, 22 Jun 2017 18:14:49 +0200 Subject: _init() -> _make() where possible --- liberty-tui.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'liberty-tui.c') diff --git a/liberty-tui.c b/liberty-tui.c index e5d37c0..3112164 100644 --- a/liberty-tui.c +++ b/liberty-tui.c @@ -61,8 +61,7 @@ struct attrs static struct attrs attrs_decode (const char *value) { - struct strv v; - strv_init (&v); + struct strv v = strv_make (); cstr_split (value, " ", true, &v); int colors = 0; @@ -110,11 +109,12 @@ struct row_buffer int total_width; ///< Total width of all characters }; -static void -row_buffer_init (struct row_buffer *self) +static struct row_buffer +row_buffer_make (void) { - memset (self, 0, sizeof *self); - ARRAY_INIT_SIZED (self->chars, 256); + struct row_buffer self = {}; + ARRAY_INIT_SIZED (self.chars, 256); + return self; } static void -- cgit v1.2.3