summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/atalk.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-09-05 17:06:51 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-09-05 17:06:51 +0000
commitcb4604919fc3c4fef1de7daff27468d6c5fbd56d (patch)
tree959e14da31f6b728ead4e7600874639513bcf91a /usr.bin/netstat/atalk.c
parentbd265f5118e4fb79ee5176679e737794dc630d3d (diff)
downloadFreeBSD-src-cb4604919fc3c4fef1de7daff27468d6c5fbd56d.zip
FreeBSD-src-cb4604919fc3c4fef1de7daff27468d6c5fbd56d.tar.gz
Warns cleanups for netstat:
1) Include arpa/inet.h for ntohs. 2) Constness fixes. 3) Fix shadowing except for "sin" which shouldn't be in scope. 4) Remove register keyword. 5) Add missing initialsers to user defined structs. 5) Make prototype of netname6 globally visable. 6) Use right macros for printing syncache stats (even though entrie isn't a word).
Diffstat (limited to 'usr.bin/netstat/atalk.c')
-rw-r--r--usr.bin/netstat/atalk.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c
index 0d9cc17..d0a09c2 100644
--- a/usr.bin/netstat/atalk.c
+++ b/usr.bin/netstat/atalk.c
@@ -45,6 +45,7 @@ static const char rcsid[] =
#include <sys/socketvar.h>
#include <sys/protosw.h>
+#include <arpa/inet.h>
#include <net/route.h>
#include <netatalk/at.h>
@@ -69,7 +70,7 @@ static int first = 1;
* -a (all) flag is specified.
*/
-static char *
+static const char *
at_pr_net(struct sockaddr_at *sat, int numeric)
{
static char mybuf[50];
@@ -86,7 +87,7 @@ static char mybuf[50];
return mybuf;
}
-static char *
+static const char *
at_pr_host(struct sockaddr_at *sat, int numeric)
{
static char mybuf[50];
@@ -103,7 +104,7 @@ static char mybuf[50];
return mybuf;
}
-static char *
+static const char *
at_pr_port(struct sockaddr_at *sat)
{
static char mybuf[50];
@@ -214,7 +215,7 @@ atalk_print2(struct sockaddr *sa, struct sockaddr *mask, int what)
}
void
-atalkprotopr(u_long off __unused, char *name, int af __unused)
+atalkprotopr(u_long off __unused, const char *name, int af1 __unused)
{
struct ddpcb *this, *next;
@@ -263,7 +264,7 @@ atalkprotopr(u_long off __unused, char *name, int af __unused)
* Dump DDP statistics structure.
*/
void
-ddp_stats(u_long off __unused, char *name, int af __unused)
+ddp_stats(u_long off __unused, const char *name, int af1 __unused)
{
struct ddpstat ddpstat;
OpenPOWER on IntegriCloud