Browse Source

Update select.c

heyuanjie87 7 years ago
parent
commit
c90b449dac
1 changed files with 5 additions and 1 deletions
  1. 5 1
      components/dfs/src/select.c

+ 5 - 1
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))
     {