summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-05-21 21:30:44 +0000
committerarr <arr@FreeBSD.org>2002-05-21 21:30:44 +0000
commit8f86bf993e2453b2c2a1824f9679e64aa789e8ea (patch)
tree6ab9cc82f69fbdb7b8bd034e6e54b2b821cbdd74 /sys/kern/uipc_socket.c
parent0ceb358d5c8c4f92a5784880a62430591bd82a14 (diff)
downloadFreeBSD-src-8f86bf993e2453b2c2a1824f9679e64aa789e8ea.zip
FreeBSD-src-8f86bf993e2453b2c2a1824f9679e64aa789e8ea.tar.gz
- td will never be NULL, so the call to soalloc() in socreate() will always
be passed a 1; we can, however, use M_NOWAIT to indicate this. - Check so against NULL since it's a pointer to a structure.
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index d4d81d8..d434d34 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -171,8 +171,8 @@ socreate(dom, aso, type, proto, cred, td)
if (prp->pr_type != type)
return (EPROTOTYPE);
- so = soalloc(td != 0);
- if (so == 0)
+ so = soalloc(M_NOWAIT);
+ if (so == NULL)
return (ENOBUFS);
SOCK_LOCK(so);
OpenPOWER on IntegriCloud