diff options
-rw-r--r-- | sys/kern/uipc_mbuf.c | 6 | ||||
-rw-r--r-- | sys/kern/uipc_socket2.c | 4 | ||||
-rw-r--r-- | sys/kern/uipc_usrreq.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_icmp.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 10 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 4 |
6 files changed, 18 insertions, 18 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 4644de7674e..5348f38a930 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.165 2011/12/02 10:55:46 dlg Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.166 2012/04/13 09:38:32 deraadt Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -695,11 +695,11 @@ m_copym0(struct mbuf *m0, int off, int len, int wait, int deep) n->m_len = min(n->m_len, len); n->m_len = min(n->m_len, m->m_len - off); memcpy(mtod(n, caddr_t), mtod(m, caddr_t) + off, - (unsigned)n->m_len); + n->m_len); } } else memcpy(mtod(n, caddr_t), mtod(m, caddr_t) + off, - (unsigned)n->m_len); + n->m_len); if (len != M_COPYALL) len -= n->m_len; off += n->m_len; diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 6d3ddb84bc8..7a04f0d4c12 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.52 2011/04/04 21:11:22 claudio Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.53 2012/04/13 09:38:32 deraadt Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -787,7 +787,7 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n) m->m_len <= M_TRAILINGSPACE(n) && n->m_type == m->m_type) { bcopy(mtod(m, caddr_t), mtod(n, caddr_t) + n->m_len, - (unsigned)m->m_len); + m->m_len); n->m_len += m->m_len; sb->sb_cc += m->m_len; if (m->m_type != MT_CONTROL && m->m_type != MT_SONAME) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 4714a386c8e..98baba24e16 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.56 2012/04/11 14:08:27 deraadt Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.57 2012/04/13 09:38:32 deraadt Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -122,7 +122,7 @@ uipc_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, if (unp->unp_conn && unp->unp_conn->unp_addr) { nam->m_len = unp->unp_conn->unp_addr->m_len; bcopy(mtod(unp->unp_conn->unp_addr, caddr_t), - mtod(nam, caddr_t), (unsigned)nam->m_len); + mtod(nam, caddr_t), nam->m_len); } else { nam->m_len = sizeof(sun_noname); *(mtod(nam, struct sockaddr *)) = sun_noname; @@ -286,7 +286,7 @@ uipc_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, if (unp->unp_addr) { nam->m_len = unp->unp_addr->m_len; bcopy(mtod(unp->unp_addr, caddr_t), - mtod(nam, caddr_t), (unsigned)nam->m_len); + mtod(nam, caddr_t), nam->m_len); } else nam->m_len = 0; break; @@ -295,7 +295,7 @@ uipc_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, if (unp->unp_conn && unp->unp_conn->unp_addr) { nam->m_len = unp->unp_conn->unp_addr->m_len; bcopy(mtod(unp->unp_conn->unp_addr, caddr_t), - mtod(nam, caddr_t), (unsigned)nam->m_len); + mtod(nam, caddr_t), nam->m_len); } else nam->m_len = 0; break; 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; diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 148a51b0660..328d561dbeb 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.123 2011/11/24 17:39:55 sperreault Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.124 2012/04/13 09:38:32 deraadt Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -1933,7 +1933,7 @@ do { \ *mp = m = m_get(M_WAIT, MT_SOOPTS); m->m_len = sizeof(tdbi); bcopy((caddr_t)&tdbi, mtod(m, caddr_t), - (unsigned)m->m_len); + m->m_len); } splx(s); #endif |