- 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.
This commit is contained in:
Andrew R. Reiter 2002-05-21 21:30:44 +00:00
parent 0e54ddadd9
commit ec41816009

View File

@ -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);