summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/ipsec.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/netstat/ipsec.c')
-rw-r--r--usr.bin/netstat/ipsec.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/netstat/ipsec.c b/usr.bin/netstat/ipsec.c
index a82ad13..2176458 100644
--- a/usr.bin/netstat/ipsec.c
+++ b/usr.bin/netstat/ipsec.c
@@ -162,7 +162,7 @@ static struct ipsecstat ipsecstat;
static void print_ipsecstats (void);
static const char *pfkey_msgtype_names (int);
static void ipsec_hist (const u_quad_t *, size_t, const struct val2str *,
- size_t, const char *);
+ const char *);
/*
* Dump IPSEC statistics structure.
@@ -171,7 +171,6 @@ static void
ipsec_hist(const u_quad_t *hist,
size_t histmax,
const struct val2str *name,
- size_t namemax,
const char *title)
{
int first;
@@ -187,7 +186,7 @@ ipsec_hist(const u_quad_t *hist,
first = 0;
}
for (p = name; p && p->str; p++) {
- if (p->val == proto)
+ if (p->val == (int)proto)
break;
}
if (p && p->str) {
@@ -205,7 +204,7 @@ print_ipsecstats(void)
#define p(f, m) if (ipsecstat.f || sflag <= 1) \
printf(m, (CAST)ipsecstat.f, plural(ipsecstat.f))
#define hist(f, n, t) \
- ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), sizeof(n)/sizeof(n[0]), (t));
+ ipsec_hist((f), sizeof(f)/sizeof(f[0]), (n), (t));
p(in_success, "\t" LLU " inbound packet%s processed successfully\n");
p(in_polvio, "\t" LLU " inbound packet%s violated process security "
@@ -237,7 +236,7 @@ print_ipsecstats(void)
}
void
-ipsec_stats(u_long off, char *name)
+ipsec_stats(u_long off __unused, char *name, int af __unused)
{
if (off == 0)
return;
@@ -261,10 +260,10 @@ pfkey_msgtype_names(int x)
}
void
-pfkey_stats(u_long off, char *name)
+pfkey_stats(u_long off __unused, char *name, int af __unused)
{
struct pfkeystat pfkeystat;
- int first, type;
+ unsigned first, type;
if (off == 0)
return;
OpenPOWER on IntegriCloud