diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2015-10-25 20:01:22 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2015-10-25 20:01:22 +0000 |
commit | 72e1cfa23e1ba9d534fd4f6e6381d3879cd05e17 (patch) | |
tree | 8f2630c26d4ec49c7809f5b1b56e8eb28d054a78 /sbin | |
parent | e120bd58f6362e4e476eb73d15ff99fe3c8c0eba (diff) |
pr_bitrange() is unused, nuke it.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ping6/ping6.c | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index 85d312eb3e7..b208cb7cda4 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping6.c,v 1.134 2015/10/25 19:58:56 florian Exp $ */ +/* $OpenBSD: ping6.c,v 1.135 2015/10/25 20:01:21 florian Exp $ */ /* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */ /* @@ -217,7 +217,6 @@ void pr_pack(u_char *, int, struct msghdr *); void pr_exthdrs(struct msghdr *); void pr_ip6opt(void *); void pr_rthdr(void *); -int pr_bitrange(u_int32_t, int, int); void pr_retip(struct ip6_hdr *, u_char *); void summary(int); void usage(void); @@ -1144,52 +1143,6 @@ pr_rthdr(void *extbuf) } int -pr_bitrange(u_int32_t v, int soff, int ii) -{ - int off; - int i; - - off = 0; - while (off < 32) { - /* shift till we have 0x01 */ - if ((v & 0x01) == 0) { - if (ii > 1) - printf("-%u", soff + off - 1); - ii = 0; - switch (v & 0x0f) { - case 0x00: - v >>= 4; - off += 4; - continue; - case 0x08: - v >>= 3; - off += 3; - continue; - case 0x04: case 0x0c: - v >>= 2; - off += 2; - continue; - default: - v >>= 1; - off += 1; - continue; - } - } - - /* we have 0x01 with us */ - for (i = 0; i < 32 - off; i++) { - if ((v & (0x01 << i)) == 0) - break; - } - if (!ii) - printf(" %u", soff + off); - ii += i; - v >>= i; off += i; - } - return ii; -} - -int get_hoplim(struct msghdr *mhdr) { struct cmsghdr *cm; |