summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sockbuf.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-02-20 15:56:13 +0000
committerrwatson <rwatson@FreeBSD.org>2005-02-20 15:56:13 +0000
commitc9c16ea8f44d1ddd53650c9b446b0b7e94bc4db1 (patch)
tree14d228b04b5f3bb6c79e1b16f57281914bea8de9 /sys/kern/uipc_sockbuf.c
parent8b42e2e7b8f7788416e3ec565d9be29e9bd5c068 (diff)
downloadFreeBSD-src-c9c16ea8f44d1ddd53650c9b446b0b7e94bc4db1.zip
FreeBSD-src-c9c16ea8f44d1ddd53650c9b446b0b7e94bc4db1.tar.gz
Prefer NULL to returning 0 cast to a pointer type.
MFC after: 3 days
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r--sys/kern/uipc_sockbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 91f152e..c7a922d 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -223,10 +223,10 @@ sonewconn(head, connstatus)
over = (head->so_qlen > 3 * head->so_qlimit / 2);
ACCEPT_UNLOCK();
if (over)
- return ((struct socket *)0);
+ return (NULL);
so = soalloc(M_NOWAIT);
if (so == NULL)
- return ((struct socket *)0);
+ return (NULL);
if ((head->so_options & SO_ACCEPTFILTER) != 0)
connstatus = 0;
so->so_head = head;
@@ -247,7 +247,7 @@ sonewconn(head, connstatus)
if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) ||
(*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) {
sodealloc(so);
- return ((struct socket *)0);
+ return (NULL);
}
so->so_state |= connstatus;
ACCEPT_LOCK();
OpenPOWER on IntegriCloud