From ec418160098a0f5ba38011095b49c1c9be7e887c Mon Sep 17 00:00:00 2001 From: "Andrew R. Reiter" Date: Tue, 21 May 2002 21:30:44 +0000 Subject: [PATCH] - 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. --- sys/kern/uipc_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index d4d81d83c424..d434d3427e6e 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);