summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket2.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2013-04-05 08:25:31 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2013-04-05 08:25:31 +0000
commit84c7c115879a734ff013eca4de8f5ac17c120b9c (patch)
treea33190fe7e93b01d3350eb0e69c12bd87708f964 /sys/kern/uipc_socket2.c
parent01e270952b7426a92767b0d570dc4018a984162a (diff)
remove some obsolete casts
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r--sys/kern/uipc_socket2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index efb81f4f23a..636e4a1efe3 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.55 2013/01/15 11:12:57 bluhm Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.56 2013/04/05 08:25:30 tedu Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -152,12 +152,12 @@ sonewconn(struct socket *head, int connstatus)
splsoftassert(IPL_SOFTNET);
if (mclpools[0].pr_nout > mclpools[0].pr_hardlimit * 95 / 100)
- return ((struct socket *)0);
+ return (NULL);
if (head->so_qlen + head->so_q0len > head->so_qlimit * 3)
- return ((struct socket *)0);
+ return (NULL);
so = pool_get(&socket_pool, PR_NOWAIT|PR_ZERO);
if (so == NULL)
- return ((struct socket *)0);
+ return (NULL);
so->so_type = head->so_type;
so->so_options = head->so_options &~ SO_ACCEPTCONN;
so->so_linger = head->so_linger;
@@ -178,7 +178,7 @@ sonewconn(struct socket *head, int connstatus)
*/
if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat)) {
pool_put(&socket_pool, so);
- return ((struct socket *)0);
+ return (NULL);
}
so->so_snd.sb_wat = head->so_snd.sb_wat;
so->so_snd.sb_lowat = head->so_snd.sb_lowat;
@@ -192,7 +192,7 @@ sonewconn(struct socket *head, int connstatus)
curproc)) {
(void) soqremque(so, soqueue);
pool_put(&socket_pool, so);
- return ((struct socket *)0);
+ return (NULL);
}
if (connstatus) {
sorwakeup(head);
@@ -931,7 +931,7 @@ sbcreatecontrol(caddr_t p, int size, int type, int level)
}
if ((m = m_get(M_DONTWAIT, MT_CONTROL)) == NULL)
- return ((struct mbuf *) NULL);
+ return (NULL);
if (CMSG_SPACE(size) > MLEN) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {