summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2012-04-13 09:38:32 +0000
committerderaadt <deraadt@openbsd.org>2012-04-13 09:38:32 +0000
commite635570d2fc19c957f7ba2f7c8ea9b66662e9fac (patch)
tree4ce516cbdbe0786fdf3ce4b47053402a692d7d15 /sys/netinet/ip_output.c
parentAdd sigwaitinfo and sigtimedwait stubs under #if 0; a bit more kernel (diff)
downloadwireguard-openbsd-e635570d2fc19c957f7ba2f7c8ea9b66662e9fac.tar.xz
wireguard-openbsd-e635570d2fc19c957f7ba2f7c8ea9b66662e9fac.zip
unneccessary casts to unsigned; ok claudio
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c10
1 files changed, 5 insertions, 5 deletions
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;