select: stop doing zero-sized memsets

Approved by:	re (kib)
This commit is contained in:
Mateusz Guzik 2018-09-21 13:20:41 +00:00
parent 18c00da806
commit d6fda03a64
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338855

View File

@ -1031,8 +1031,9 @@ kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou,
error = copyin(name, ibits[x], ncpubytes); \
if (error != 0) \
goto done; \
bzero((char *)ibits[x] + ncpubytes, \
ncpbytes - ncpubytes); \
if (ncpbytes != ncpubytes) \
bzero((char *)ibits[x] + ncpubytes, \
ncpbytes - ncpubytes); \
} \
} while (0)
getbits(fd_in, 0);