dhtlog updates
[oweals/gnunet.git] / src / util / network.c
index 9b96436db0fe02427bec264a363180a2679c502d..38d9ccb72e75d3bbd929abdcb5e7b7ebaf41fc81 100644 (file)
@@ -56,7 +56,7 @@ struct GNUNET_NETWORK_FDSet
 {
 
   /**
-   * Maximum number of any socket socket descriptor in the set
+   * Maximum number of any socket socket descriptor in the set (plus one)
    */
   int nsds;
 
@@ -1007,7 +1007,7 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
       GNUNET_break (0);
     }
 #ifndef MINGW
-  return select (nfds + 1,
+  return select (nfds,
                  (rfds != NULL) ? &rfds->sds : NULL,
                  (wfds != NULL) ? &wfds->sds : NULL,
                  (efds != NULL) ? &efds->sds : NULL,