]> Sergey Matveev's repositories - nnn.git/commitdiff
Get rid of redundant buffer
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 16 May 2019 16:11:20 +0000 (21:41 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 22 May 2019 03:18:44 +0000 (08:48 +0530)
src/nnn.c

index 2a7da5ed07b9647353ea9f9d18c69f65bd8b9334..97f2079964c2d264875c2ba6936b3109b35a8fe0 100644 (file)
--- 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];
 }