diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2001-05-16 12:54:35 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2001-05-16 12:54:35 +0000 |
commit | 60de2c41ea2b387be2e4b7b9b565329dd0a61c36 (patch) | |
tree | 8652597c096bbc850f6862988cd18624122c0051 /sys/kern/sys_generic.c | |
parent | 87f10021e726a2d2d79e079d9fe15180e3023b3e (diff) |
No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)
Diffstat (limited to 'sys/kern/sys_generic.c')
-rw-r--r-- | sys/kern/sys_generic.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 595071f1258..5c2b5a3e2c5 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.28 2000/11/10 18:15:47 art Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.29 2001/05/16 12:52:58 ho Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -691,10 +691,7 @@ sys_select(p, v, retval) if (SCARG(uap, nd) > FD_SETSIZE) { caddr_t mbits; - if ((mbits = malloc(ni * 6, M_TEMP, M_WAITOK)) == NULL) { - error = EINVAL; - goto cleanup; - } + mbits = malloc(ni * 6, M_TEMP, M_WAITOK); bzero(mbits, ni * 6); pibits[0] = (fd_set *)&mbits[ni * 0]; pibits[1] = (fd_set *)&mbits[ni * 1]; @@ -779,7 +776,6 @@ done: #undef putbits } -cleanup: if (pibits[0] != &bits[0]) free(pibits[0], M_TEMP); return (error); |