aboutsummaryrefslogtreecommitdiff
path: root/liberty-tui.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-06-22 18:14:49 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-06-22 20:42:44 +0200
commitbf534010cb6163bd6ebdef132ee62cccb2b2c9ba (patch)
treea032c00a96a891cc4fc73c882eb55af8d6c8f046 /liberty-tui.c
parent7b0d7a19e5764aad6fde659e90b1484bde3a4551 (diff)
downloadliberty-bf534010cb6163bd6ebdef132ee62cccb2b2c9ba.tar.gz
liberty-bf534010cb6163bd6ebdef132ee62cccb2b2c9ba.tar.xz
liberty-bf534010cb6163bd6ebdef132ee62cccb2b2c9ba.zip
_init() -> _make() where possible
Diffstat (limited to 'liberty-tui.c')
-rw-r--r--liberty-tui.c12
1 files changed, 6 insertions, 6 deletions
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