commit a937265833554a84856700240606de150a9b3c70
parent f2c7495f5079d99f9b702c768dd1ee179ec40d3e
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date: Wed, 20 Jul 2022 18:49:24 +0530
Reduce get_wch() array length and initialization.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nnn.c b/src/nnn.c
@@ -3247,7 +3247,7 @@ static int filterentries(char *path, char *lastname)
{
wchar_t *wln = (wchar_t *)alloca(sizeof(wchar_t) * REGEX_MAX);
char *ln = g_ctx[cfg.curctx].c_fltr;
- wint_t ch[2] = {0};
+ wint_t ch[1];
int r, total = ndents, len;
char *pln = g_ctx[cfg.curctx].c_fltr + 1;
@@ -3454,7 +3454,7 @@ static char *xreadline(const char *prefill, const char *prompt)
size_t len, pos;
int x, r;
const int WCHAR_T_WIDTH = sizeof(wchar_t);
- wint_t ch[2] = {0};
+ wint_t ch[1];
wchar_t * const buf = malloc(sizeof(wchar_t) * READLINE_MAX);
if (!buf)