diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-04-13 09:38:33 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-04-13 09:38:33 +0000 |
commit | ea34965f8126cc43f9691ba463e97146abf8a902 (patch) | |
tree | 566fed278c431279294942fe83f2e16c08431277 /sys/netinet | |
parent | 4e1412b0c3fea3a30904b255aca56d424a1b0ba5 (diff) |
unneccessary casts to unsigned; ok claudio
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_icmp.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 8fdbef04b10..6f6a69d8681 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.94 2011/07/06 01:57:37 dlg Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.95 2012/04/13 09:38:32 deraadt Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -786,7 +786,7 @@ icmp_reflect(struct mbuf *m, struct mbuf **op, struct in_ifaddr *ia) m->m_pkthdr.len -= optlen; optlen += sizeof(struct ip); bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1), - (unsigned)(m->m_len - sizeof(struct ip))); + m->m_len - sizeof(struct ip)); } m->m_flags &= ~(M_BCAST|M_MCAST); if (op) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 279f77cce4b..19acb1c7b64 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.228 2012/04/07 16:09:09 claudio Exp $ */ +/* $OpenBSD: ip_output.c,v 1.229 2012/04/13 09:38:32 deraadt Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -936,7 +936,7 @@ ip_insertoptions(m, opt, phlen) struct ipoption *p = mtod(opt, struct ipoption *); struct mbuf *n; struct ip *ip = mtod(m, struct ip *); - unsigned optlen; + unsigned int optlen; optlen = opt->m_len - sizeof(p->ipopt_dst); if (optlen + ntohs(ip->ip_len) > IP_MAXPACKET) @@ -963,7 +963,7 @@ ip_insertoptions(m, opt, phlen) ovbcopy((caddr_t)ip, mtod(m, caddr_t), sizeof(struct ip)); } ip = mtod(m, struct ip *); - bcopy((caddr_t)p->ipopt_list, (caddr_t)(ip + 1), (unsigned)optlen); + bcopy((caddr_t)p->ipopt_list, (caddr_t)(ip + 1), optlen); *phlen = sizeof(struct ip) + optlen; ip->ip_len = htons(ntohs(ip->ip_len) + optlen); return (m); @@ -1006,7 +1006,7 @@ ip_optcopy(ip, jp) if (optlen > cnt) optlen = cnt; if (IPOPT_COPIED(opt)) { - bcopy((caddr_t)cp, (caddr_t)dp, (unsigned)optlen); + bcopy((caddr_t)cp, (caddr_t)dp, optlen); dp += optlen; } } @@ -1431,7 +1431,7 @@ ip_ctloutput(op, so, level, optname, mp) if (inp->inp_options) { m->m_len = inp->inp_options->m_len; bcopy(mtod(inp->inp_options, caddr_t), - mtod(m, caddr_t), (unsigned)m->m_len); + mtod(m, caddr_t), m->m_len); } else m->m_len = 0; break; |