diff options
author | 2003-06-20 16:53:15 +0000 | |
---|---|---|
committer | 2003-06-20 16:53:15 +0000 | |
commit | 3c5a1c275ea408dd9de2d5ed7601c74ce5581c31 (patch) | |
tree | 47ca8a32a4f717575d58fe577202759feb626d03 | |
parent | sync (diff) | |
download | wireguard-openbsd-3c5a1c275ea408dd9de2d5ed7601c74ce5581c31.tar.xz wireguard-openbsd-3c5a1c275ea408dd9de2d5ed7601c74ce5581c31.zip |
some cleanings recommended by lint
-rw-r--r-- | usr.bin/top/commands.c | 4 | ||||
-rw-r--r-- | usr.bin/top/utils.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/top/commands.c b/usr.bin/top/commands.c index 77d51e8e04d..280a64e33a0 100644 --- a/usr.bin/top/commands.c +++ b/usr.bin/top/commands.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commands.c,v 1.11 2003/06/17 00:51:29 jfb Exp $ */ +/* $OpenBSD: commands.c,v 1.12 2003/06/20 16:53:15 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -197,7 +197,7 @@ err_string(void) return (NULL); /* sort the errors */ - qsort((char *) errs, errcnt, sizeof(struct errs), err_compar); + qsort(errs, errcnt, sizeof(struct errs), err_compar); /* need a space at the front of the error string */ string[0] = ' '; diff --git a/usr.bin/top/utils.c b/usr.bin/top/utils.c index d0a36b4db81..74be677604e 100644 --- a/usr.bin/top/utils.c +++ b/usr.bin/top/utils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utils.c,v 1.11 2003/06/19 22:40:45 millert Exp $ */ +/* $OpenBSD: utils.c,v 1.12 2003/06/20 16:53:15 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -43,7 +43,7 @@ int atoiwi(char *str) { - int len; + size_t len; len = strlen(str); if (len != 0) { @@ -310,11 +310,11 @@ char * format_k(int amt) { static char retarray[NUM_STRINGS][16]; - static int index = 0; + static int idx = 0; char *ret, tag = 'K'; - ret = retarray[index]; - index = (index + 1) % NUM_STRINGS; + ret = retarray[idx]; + idx = (idx + 1) % NUM_STRINGS; if (amt >= 10000) { amt = (amt + 512) / 1024; |