top(1): increase size of 'status' buffer

This corrects a warning issues by gcc9:
/srv/src/freebsd/head/usr.bin/top/machine.c:988:22: warning: '%5zu'
directive writing between 5 and 20 bytes into a
 region of size 15 [-Wformat-overflow=]
     sprintf(status, "?%5zu", state);
This commit is contained in:
eadler 2018-05-22 07:56:58 +00:00
parent 2eae2c18c9
commit 0394adab91

View File

@ -920,7 +920,7 @@ format_next_process(caddr_t xhandle, char *(*get_userid)(int), int flags)
long cputime;
double pct;
struct handle *hp;
char status[16];
char status[22];
int cpu;
size_t state;
struct rusage ru, *rup;