[tor-commits] [tor/master] note some dead code in set_max_file_descriptors

nickm at torproject.org nickm at torproject.org
Sat Jul 11 20:53:35 UTC 2015


commit de397d57c9ea06ca3e0bba13f393cd9208611cb7
Author: Nick Mathewson <nickm at torproject.org>
Date:   Sat Jul 11 16:53:32 2015 -0400

    note some dead code in set_max_file_descriptors
---
 src/common/compat.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/common/compat.c b/src/common/compat.c
index 34f6ea2..9d01c9d 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1642,6 +1642,9 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
     return -1;
   }
   if (limit == 0) {
+    /* XXXX DEAD CODE We can't reach this point, since the first "if" in this
+     * function increases limit if it started out less than ULIMIT_BUFFER */
+
     /* If limit == 0, return the maximum value without setting it. */
     limit = rlim.rlim_max;
     if (limit > INT_MAX)



More information about the tor-commits mailing list