From fb4728bc317ff90f8cc11055194fb3e0e4d33ec7 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 16 May 2019 21:41:20 +0530 Subject: [PATCH] Get rid of redundant buffer --- src/nnn.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index 2a7da5ed..97f20799 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -537,12 +537,11 @@ static uint xatoi(const char *str) static char *xitoa(uint val) { - const char hexbuf[] = "0123456789"; static char ascbuf[32] = {0}; int i; for (i = 30; val && i; --i, val /= 10) - ascbuf[i] = hexbuf[val % 10]; + ascbuf[i] = '0' + (val % 10); return &ascbuf[++i]; }