From: Nick Mathewson Date: Mon, 1 Nov 2004 22:41:32 +0000 (+0000) Subject: Fix signed/unsigned comparison warning X-Git-Tag: debian-version-0.0.8+0.0.9pre5-1~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1433a0b26fcc1e48ac8001c5438e00d140dbf2a9;p=thirdparty%2Ftor.git Fix signed/unsigned comparison warning svn:r2643 --- diff --git a/src/common/compat.c b/src/common/compat.c index 5b4c93110a..58ba52c375 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -302,7 +302,7 @@ tor_socketpair(int family, int type, int protocol, int fd[2]) /** Get the maximum allowed number of file descriptors. (Some systems * have a low soft limit.) Make sure we set it to at least * required_min. Return 0 if we can, or -1 if we fail. */ -int set_max_file_descriptors(int required_min) { +int set_max_file_descriptors(unsigned int required_min) { #ifndef HAVE_GETRLIMIT log_fn(LOG_INFO,"This platform is missing getrlimit(). Proceeding."); return 0; /* hope we'll be ok */ diff --git a/src/common/compat.h b/src/common/compat.h index afc8af41f7..50acd42444 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -143,7 +143,7 @@ void set_uint16(char *cp, uint16_t v); void set_uint32(char *cp, uint32_t v); #endif -int set_max_file_descriptors(int required_min); +int set_max_file_descriptors(unsigned int required_min); int switch_id(char *user, char *group); int spawn_func(int (*func)(void *), void *data);