summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump/print-bgp.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-01-12 11:26:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-01-12 11:26:49 +0000
commit6e395c431e4d5fb8fcf9b1b0a852614a286666ad (patch)
treeae9ff0c70f985df21c284915fb4f643217a2ecb2 /usr.sbin/tcpdump/print-bgp.c
parentfb62f049a8d2f2b2bd243f097934610cf1fc9410 (diff)
plen is unsigned
Diffstat (limited to 'usr.sbin/tcpdump/print-bgp.c')
-rw-r--r--usr.sbin/tcpdump/print-bgp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-bgp.c b/usr.sbin/tcpdump/print-bgp.c
index a276a00169e..61b86c8ebc0 100644
--- a/usr.sbin/tcpdump/print-bgp.c
+++ b/usr.sbin/tcpdump/print-bgp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-bgp.c,v 1.15 2012/02/19 17:24:05 claudio Exp $ */
+/* $OpenBSD: print-bgp.c,v 1.16 2014/01/12 11:26:48 deraadt Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@@ -358,7 +358,7 @@ decode_prefix4(const u_char *pd, char *buf, u_int buflen)
((u_char *)&addr)[(plen + 7) / 8 - 1] &=
((0xff00 >> (plen % 8)) & 0xff);
}
- n = snprintf(buf, buflen, "%s/%d", getname((u_char *)&addr), plen);
+ n = snprintf(buf, buflen, "%s/%u", getname((u_char *)&addr), plen);
if (n == -1 || n >= buflen)
return -1;
@@ -389,7 +389,7 @@ decode_prefix6(const u_char *pd, char *buf, u_int buflen)
((0xff00 >> (plen % 8)) & 0xff);
}
- n = snprintf(buf, buflen, "%s/%d", getname6((u_char *)&addr), plen);
+ n = snprintf(buf, buflen, "%s/%u", getname6((u_char *)&addr), plen);
if (n == -1 || n >= buflen)
return -1;