[or-cvs] when you cast MAX_UINT to an int it confuses the users
Roger Dingledine
arma at seul.org
Wed Nov 10 09:09:19 UTC 2004
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
Modified Files:
compat.c
Log Message:
when you cast MAX_UINT to an int it confuses the users
Index: compat.c
===================================================================
RCS file: /home/or/cvsroot/src/common/compat.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- compat.c 9 Nov 2004 20:04:00 -0000 1.8
+++ compat.c 10 Nov 2004 09:09:15 -0000 1.9
@@ -320,12 +320,12 @@
return -1;
}
if(required_min > rlim.rlim_max) {
- log_fn(LOG_WARN,"We need %d file descriptors available, and we're limited to %d. Please change your ulimit.", required_min, (int)rlim.rlim_max);
+ log_fn(LOG_WARN,"We need %u file descriptors available, and we're limited to %lu. Please change your ulimit.", required_min, (unsigned long int)rlim.rlim_max);
return -1;
}
if(required_min > rlim.rlim_cur) {
- log_fn(LOG_INFO,"Raising max file descriptors from %d to %d.",
- (int)rlim.rlim_cur, (int)rlim.rlim_max);
+ log_fn(LOG_INFO,"Raising max file descriptors from %lu to %lu.",
+ (unsigned long int)rlim.rlim_cur, (unsigned long int)rlim.rlim_max);
}
rlim.rlim_cur = rlim.rlim_max;
if (setrlimit(RLIMIT_NOFILE, &rlim) != 0) {
More information about the tor-commits
mailing list