Przeglądaj źródła

Get rid of redundant buffer

master
Arun Prakash Jana 5 lat temu
rodzic
commit
fb4728bc31
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: A75979F35C080412
1 zmienionych plików z 1 dodań i 2 usunięć
  1. +1
    -2
      src/nnn.c

+ 1
- 2
src/nnn.c Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz