From abf6384cca0f80fe7dfb35a8e2281d8664d9d459 Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Sat, 11 Jan 2025 23:10:24 -0700 Subject: buffer: delete pointless buffer_init function lets not make the code harder to read for no reason --- main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 3e9d9ab..2989dd4 100644 --- a/main.c +++ b/main.c @@ -2154,9 +2154,8 @@ static const char *unicode_info(Vis *vis, const char *keys, const Arg *arg) { char *grapheme = text_bytes_alloc0(txt, start, end-start), *codepoint = grapheme; if (!grapheme) return keys; - Buffer info; - buffer_init(&info); - mbstate_t ps = { 0 }; + Buffer info = {0}; + mbstate_t ps = {0}; Iterator it = text_iterator_get(txt, start); for (size_t pos = start; it.pos < end; pos = it.pos) { if (!text_iterator_codepoint_next(&it, NULL)) { -- cgit v1.2.3