[or-cvs] Fix signed/unsigned comparison warning

Nick Mathewson nickm at seul.org
Mon Nov 1 22:41:35 UTC 2004


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv11327/src/common

Modified Files:
	compat.c compat.h 
Log Message:
Fix signed/unsigned comparison warning

Index: compat.c
===================================================================
RCS file: /home/or/cvsroot/src/common/compat.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- compat.c	1 Nov 2004 20:41:46 -0000	1.1
+++ compat.c	1 Nov 2004 22:41:32 -0000	1.2
@@ -302,7 +302,7 @@
 /** Get the maximum allowed number of file descriptors. (Some systems
  * 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. */
-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 */

Index: compat.h
===================================================================
RCS file: /home/or/cvsroot/src/common/compat.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- compat.h	1 Nov 2004 20:41:46 -0000	1.1
+++ compat.h	1 Nov 2004 22:41:32 -0000	1.2
@@ -143,7 +143,7 @@
 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);



More information about the tor-commits mailing list