update select.c

This commit is contained in:
heyuanjie87 2018-08-12 20:41:56 +08:00 committed by GitHub
parent fd209cb880
commit d948dba42a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ static void fdzero(fd_set *set, int nfds)
int n;
m = (fd_mask*)set;
for (n = 0; n < nfds; n += sizeof(fd_mask))
for (n = 0; n < nfds; n += (sizeof(fd_mask) * 8))
{
rt_memset(m, 0, sizeof(fd_mask));
m ++;