aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-10-14 02:47:09 +0000
committerRoger Dingledine <arma@torproject.org>2004-10-14 02:47:09 +0000
commitaebc3a03ba6eea02f4d50fa4bd5dbf49cd37a0c7 (patch)
treebd0b81c8f1021d0b8150cd32ba41b4c6c5489e78 /src/or/rephist.c
parent92bb360ad771a4cba21f1e4a77e367f973e546ef (diff)
downloadtor-aebc3a03ba6eea02f4d50fa4bd5dbf49cd37a0c7.tar
tor-aebc3a03ba6eea02f4d50fa4bd5dbf49cd37a0c7.tar.gz
more int to size_t conversions, fixing one or more amd64 bugs
plus a whitespace patch on config.c from vicman svn:r2482
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index ed701009b..6838ceaf1 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -236,7 +236,7 @@ void rep_hist_dump_stats(time_t now, int severity)
void *or_history_p, *link_history_p;
double uptime;
char buffer[2048];
- int len;
+ size_t len;
unsigned long upt, downt;
routerinfo_t *r;
@@ -279,6 +279,7 @@ void rep_hist_dump_stats(time_t now, int severity)
name2 = "(unknown)";
link_history = (link_history_t*) link_history_p;
+/* XXX009 snprintf can return -1 for error also. need to detect. */
len += snprintf(buffer+len, 2048-len, "%s(%ld/%ld); ", name2,
link_history->n_extend_ok,
link_history->n_extend_ok+link_history->n_extend_fail);