[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] fix signed/unsigned bug
Update of /home2/or/cvsroot/tor/src/common
In directory moria.mit.edu:/home2/arma/work/onion/0091/tor/src/common
Modified Files:
Tag: tor-0_0_9-patches
compat.c compat.h
Log Message:
fix signed/unsigned bug
Index: compat.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.22.2.6
retrieving revision 1.22.2.7
diff -u -d -r1.22.2.6 -r1.22.2.7
--- compat.c 4 Feb 2005 00:56:23 -0000 1.22.2.6
+++ compat.c 4 Feb 2005 01:00:12 -0000 1.22.2.7
@@ -355,7 +355,7 @@
/** Get the maximum allowed number of file descriptors. (Some systems
* have a low soft limit.) Make sure we set it to at least
* 1024. Return 0 if we can, or -1 if we fail. */
-int set_max_file_descriptors(unsigned int *maxconn) {
+int set_max_file_descriptors(int *maxconn) {
#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: /home2/or/cvsroot/tor/src/common/compat.h,v
retrieving revision 1.13.2.5
retrieving revision 1.13.2.6
diff -u -d -r1.13.2.5 -r1.13.2.6
--- compat.h 4 Feb 2005 00:44:02 -0000 1.13.2.5
+++ compat.h 4 Feb 2005 01:00:12 -0000 1.13.2.6
@@ -177,7 +177,7 @@
void set_uint32(char *cp, uint32_t v);
#endif
-int set_max_file_descriptors(unsigned int *maxconn);
+int set_max_file_descriptors(int *maxconn);
int switch_id(char *user, char *group);
#ifdef HAVE_PWD_H
char *get_user_homedir(const char *username);