diff options
author | yar <yar@FreeBSD.org> | 2006-07-28 16:16:40 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2006-07-28 16:16:40 +0000 |
commit | 59fab84bab308e4a3eb124a99ce391729ed77614 (patch) | |
tree | 8935d305c75dcfea6a10f10d3ac08de7e612c074 /usr.bin/netstat/netgraph.c | |
parent | e1db503689ae54aa3513f73b6e1aa4212ded2641 (diff) | |
download | FreeBSD-src-59fab84bab308e4a3eb124a99ce391729ed77614.zip FreeBSD-src-59fab84bab308e4a3eb124a99ce391729ed77614.tar.gz |
- Achieve WARNS=3 by using sparse initializers or avoiding initializers at all.
- Fix a nlist initialization: it should be terminated by a NULL entry.
- Constify.
- Catch an unused parameter.
Tested on: i386 amd64 ia64
Diffstat (limited to 'usr.bin/netstat/netgraph.c')
-rw-r--r-- | usr.bin/netstat/netgraph.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c index 267df9d..77db23f 100644 --- a/usr.bin/netstat/netgraph.c +++ b/usr.bin/netstat/netgraph.c @@ -75,7 +75,8 @@ netgraphprotopr(u_long off, const char *name, int af1 __unused) const char *const modname = "ng_socket.ko"; /* XXX We should get "mpath" from "sysctl kern.module_path" */ const char *mpath[] = { "/", "/boot/", "/modules/", NULL }; - struct nlist sym[] = { { "_ngsocklist" }, { NULL } }; + struct nlist sym[] = { { .n_name = "_ngsocklist" }, + { .n_name = NULL } }; const char **pre; struct kld_file_stat ks; int fileid; |