summaryrefslogtreecommitdiff
path: root/components/dfs/src/select.c
diff options
context:
space:
mode:
authorheyuanjie87 <[email protected]>2018-08-13 22:42:09 +0800
committerGitHub <[email protected]>2018-08-13 22:42:09 +0800
commitc90b449dac29e3e5a46a20988b043d283d3405d6 (patch)
tree93a45b7b18a47dd765753dae2d10dc92043bab6d /components/dfs/src/select.c
parentd948dba42a7b2a219508ac28cf78e6e44f835dcf (diff)
Update select.c
Diffstat (limited to 'components/dfs/src/select.c')
-rw-r--r--components/dfs/src/select.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/dfs/src/select.c b/components/dfs/src/select.c
index 3c83ac109c..339d506c7f 100644
--- a/components/dfs/src/select.c
+++ b/components/dfs/src/select.c
@@ -32,7 +32,11 @@ static void fdzero(fd_set *set, int nfds)
{
fd_mask *m;
int n;
-
+
+ /*
+ The 'sizeof(fd_set)' of the system space may differ from user space,
+ so the actual size of the 'fd_set' is determined here with the parameter 'nfds'
+ */
m = (fd_mask*)set;
for (n = 0; n < nfds; n += (sizeof(fd_mask) * 8))
{