diff --git a/src/common/compat.c b/src/common/compat.c
index 689c7eaed4..0d9de300a5 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -441,9 +441,15 @@ tor_socketpair(int family, int type, int protocol, int fd[2])
#define ULIMIT_BUFFER 32 /* keep 32 extra fd's beyond _ConnLimit */
-/** Get the maximum allowed number of file descriptors. (Some systems
- * have a low soft limit.) Make sure we set it to at least
- * limit. Return a new limit if we can, or -1 if we fail. */
+/** Learn the maximum allowed number of file descriptors. (Some systems
+ * have a low soft limit.
+ *
+ * We compute this by finding the largest number between limit
+ * and cap that we can use. If we can't find a number greater
+ * than or equal to limit, then we fail: return -1.
+ *
+ * Otherwise, return the number minus some buffer to allow for other
+ * file descriptors we'll want available for ordinary use. */
int
set_max_file_descriptors(unsigned long limit, unsigned long cap)
{