]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
top(1): another pass of cleanup
authoreadler <eadler@FreeBSD.org>
Sun, 3 Jun 2018 23:40:54 +0000 (23:40 +0000)
committereadler <eadler@FreeBSD.org>
Sun, 3 Jun 2018 23:40:54 +0000 (23:40 +0000)
commit0d7f83c56e3995ecb0b15d705cacabdecf849f54
tree77e7707e3be16eaf2b3307f18f367ec8322e97d2
parentea3776a9523753937c59dfddb34e05ff6822fcce
top(1): another pass of cleanup

- avoid the need to call a function to get size of known array. I'll
likely re-arrange some of the indirect in a later to avoid the magic
constants.
- use correct type
- add const
- replace caddr_t with void*. This corrects an alignment warning.
- remove duplicated include from immediately prior commit

Under base clang we're now down to:
- 3 warning in top.c, 1 warning in mahcine.c,  4 warning in display.c,
- 1 warning in utils.c

Tested with base clang, gcc7, gcc9, base gcc (mips)
usr.bin/top/display.c
usr.bin/top/machine.c
usr.bin/top/machine.h
usr.bin/top/top.c
usr.bin/top/top.h
usr.bin/top/utils.c
usr.bin/top/utils.h