From: Nick Mathewson Date: Wed, 25 Jan 2017 18:23:08 +0000 (-0500) Subject: Fix a signed/unsigned comparison warning X-Git-Tag: tor-0.3.0.3-alpha~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad382049ed9b3408992a7a7ee4dfe2ecdb1d5897;p=thirdparty%2Ftor.git Fix a signed/unsigned comparison warning --- diff --git a/src/common/compat.c b/src/common/compat.c index 16b222904a..0dbede6bed 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -258,7 +258,7 @@ tor_mmap_file(const char *filename) page_size = getpagesize(); size += (size%page_size) ? page_size-(size%page_size) : 0; - if (st.st_size > SSIZE_T_CEILING || size < st.st_size) { + if (st.st_size > SSIZE_T_CEILING || (off_t)size < st.st_size) { log_warn(LD_FS, "File \"%s\" is too large. Ignoring.",filename); errno = EFBIG; close(fd);