Get rid of redundant buffer

This commit is contained in:
Arun Prakash Jana 2019-05-16 21:41:20 +05:30
parent d803521c6d
commit fb4728bc31
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 1 additions and 2 deletions

View File

@ -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];
}