Browse Source

Fix signed/unsigned comparison warning

svn:r2643
Nick Mathewson 21 years ago
parent
commit
1433a0b26f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/common/compat.c
  2. 1 1
      src/common/compat.h

+ 1 - 1
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
 /** Get the maximum allowed number of file descriptors. (Some systems
  * have a low soft limit.) Make sure we set it to at least
  * have a low soft limit.) Make sure we set it to at least
  * <b>required_min</b>. Return 0 if we can, or -1 if we fail. */
  * <b>required_min</b>. 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
 #ifndef HAVE_GETRLIMIT
   log_fn(LOG_INFO,"This platform is missing getrlimit(). Proceeding.");
   log_fn(LOG_INFO,"This platform is missing getrlimit(). Proceeding.");
   return 0; /* hope we'll be ok */
   return 0; /* hope we'll be ok */

+ 1 - 1
src/common/compat.h

@@ -143,7 +143,7 @@ void set_uint16(char *cp, uint16_t v);
 void set_uint32(char *cp, uint32_t v);
 void set_uint32(char *cp, uint32_t v);
 #endif
 #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 switch_id(char *user, char *group);
 
 
 int spawn_func(int (*func)(void *), void *data);
 int spawn_func(int (*func)(void *), void *data);