summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-10 09:09:15 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-10 09:09:15 +0000
commit987cb2b93a6d5c670639c347535f289723b7d1dc (patch)
tree783cee98c9690857980dfaddf17e129c34ee1ce5
parent23a69fde8ee3aca547b45ebaf77668fd0482a934 (diff)
downloadtor-987cb2b93a6d5c670639c347535f289723b7d1dc.tar.gz
tor-987cb2b93a6d5c670639c347535f289723b7d1dc.zip
when you cast MAX_UINT to an int it confuses the users
svn:r2788
-rw-r--r--src/common/compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 0b67820c6c..ce99db1c12 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -320,12 +320,12 @@ int set_max_file_descriptors(unsigned int required_min) {
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) {