diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-01-17 09:06:32 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-01-17 09:06:32 -0500 |
commit | 0bfd5a659777688798722a20f894797a4f4b54f0 (patch) | |
tree | f7d8d309e3e5f9f567443f96651a97c228db311c /src/common | |
parent | 68ca6d2e1971372617f920e71a4a51e16900095e (diff) | |
download | tor-0bfd5a659777688798722a20f894797a4f4b54f0.tar.gz tor-0bfd5a659777688798722a20f894797a4f4b54f0.zip |
Add a cast to avoid a signed/unsigned comparison
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index a88e9b5145..4ac443c134 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -1723,7 +1723,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out) if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) { /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is * full of nasty lies. I'm looking at you, OSX 10.5.... */ - rlim.rlim_cur = MIN(try_limit, rlim.rlim_cur); + rlim.rlim_cur = MIN((rlim_t) try_limit, rlim.rlim_cur); if (setrlimit(RLIMIT_NOFILE, &rlim) == 0) { if (rlim.rlim_cur < (rlim_t)limit) { log_warn(LD_CONFIG, "We are limited to %lu file descriptors by " |