summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-04-13 09:38:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-04-13 09:38:33 +0000
commitea34965f8126cc43f9691ba463e97146abf8a902 (patch)
tree566fed278c431279294942fe83f2e16c08431277 /sys/kern
parent4e1412b0c3fea3a30904b255aca56d424a1b0ba5 (diff)
unneccessary casts to unsigned; ok claudio
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_mbuf.c6
-rw-r--r--sys/kern/uipc_socket2.c4
-rw-r--r--sys/kern/uipc_usrreq.c8
3 files changed, 9 insertions, 9 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;