From 59fab84bab308e4a3eb124a99ce391729ed77614 Mon Sep 17 00:00:00 2001 From: yar Date: Fri, 28 Jul 2006 16:16:40 +0000 Subject: - 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 --- usr.bin/netstat/netgraph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/netstat/netgraph.c') 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; -- cgit v1.1