4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 15:53:32 +08:00

Update select.c

This commit is contained in:
heyuanjie87 2018-08-14 09:33:22 +08:00 committed by GitHub
parent c90b449dac
commit 18510fa80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@
#include <dfs_poll.h> #include <dfs_poll.h>
#include <dfs_select.h> #include <dfs_select.h>
static void fdzero(fd_set *set, int nfds) static void fdszero(fd_set *set, int nfds)
{ {
fd_mask *m; fd_mask *m;
int n; int n;
@ -130,17 +130,17 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
/* Now set up the return values */ /* Now set up the return values */
if (readfds) if (readfds)
{ {
fdzero(readfds, nfds); fdszero(readfds, nfds);
} }
if (writefds) if (writefds)
{ {
fdzero(writefds, nfds); fdszero(writefds, nfds);
} }
if (exceptfds) if (exceptfds)
{ {
fdzero(exceptfds, nfds); fdszero(exceptfds, nfds);
} }
/* Convert the poll descriptor list back into selects 3 bitsets */ /* Convert the poll descriptor list back into selects 3 bitsets */