diff options
author | Denis Ovsienko <infrastation@yandex.ru> | 2013-12-19 18:00:16 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2013-12-19 18:02:29 +0400 |
commit | 57c538422b7fcde95be3df88912f13a792ce7ccc (patch) | |
tree | 3b2b32dab27fe9abc2bfd7d4cf10f6ce537d1cfd /print-mobility.c | |
parent | 4ae4df98b29a96980cd33cd48cb99d58a6060725 (diff) | |
download | tcpdump-57c538422b7fcde95be3df88912f13a792ce7ccc.tar.gz |
IPv6: use unsigned mobility vars (GH #47 pt. 2)
Diffstat (limited to 'print-mobility.c')
-rw-r--r-- | print-mobility.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/print-mobility.c b/print-mobility.c index 752dcd73..21e3cedf 100644 --- a/print-mobility.c +++ b/print-mobility.c @@ -89,10 +89,9 @@ struct ip6_mobility { #define IP6MOPT_AUTH_MINLEN 12 static void -mobility_opt_print(const u_char *bp, int len) +mobility_opt_print(const u_char *bp, const unsigned len) { - int i; - int optlen; + unsigned i, optlen; for (i = 0; i < len; i += optlen) { if (bp[i] == IP6MOPT_PAD1) @@ -172,7 +171,8 @@ mobility_print(const u_char *bp, const u_char *bp2 _U_) { const struct ip6_mobility *mh; const u_char *ep; - int mhlen, hlen, type; + unsigned mhlen, hlen; + u_int8_t type; mh = (struct ip6_mobility *)bp; @@ -195,7 +195,7 @@ mobility_print(const u_char *bp, const u_char *bp2 _U_) mhlen = ep - bp; goto trunc; } - mhlen = (int)((mh->ip6m_len + 1) << 3); + mhlen = (mh->ip6m_len + 1) << 3; /* XXX ip6m_cksum */ |