diff options
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index ed701009bc..6838ceaf10 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); |