diff options
author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2006-11-27 17:24:36 +0000 |
---|---|---|
committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2006-11-27 17:24:36 +0000 |
commit | 6549e8c62efcfad39dfe294113255845264319d8 (patch) | |
tree | 0ee943d6d4eb0aa20c8aa4caaea6d18eee3f71b0 /usr.bin/systat/netstat.c | |
parent | 9540596e833ff425d563406301cd289f569f9dc1 (diff) | |
download | src-6549e8c62efcfad39dfe294113255845264319d8.tar.gz src-6549e8c62efcfad39dfe294113255845264319d8.zip |
+ WARNS=4 reminds that nlist.n_name isn't const.
+ Use C99 initializers to be WARNS-clean.
+ The last element in a namelist should have its n_name set to NULL,
not to an empty string.
Notes
Notes:
svn path=/head/; revision=164679
Diffstat (limited to 'usr.bin/systat/netstat.c')
-rw-r--r-- | usr.bin/systat/netstat.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c index 1ffc14ee40a6..564362e0d721 100644 --- a/usr.bin/systat/netstat.c +++ b/usr.bin/systat/netstat.c @@ -146,12 +146,14 @@ static const char *miblist[] = { "net.inet.udp.pcblist" }; +static char tcb[] = "tcb", udb[] = "udb"; + struct nlist namelist[] = { #define X_TCB 0 - { "tcb" }, + { .n_name = tcb }, #define X_UDB 1 - { "udb" }, - { "" }, + { .n_name = udb }, + { .n_name = NULL }, }; int |