diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-16 14:26:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-05-16 14:26:35 -0400 |
commit | 0bec9f320b81a85ba3596e9780b1cf7c770dfb31 (patch) | |
tree | 2323efba21ab2671212ab05361869f2ad1f9411a /src/or/rephist.c | |
parent | 75fc4dbbcabaedc715f0f9e883ccab1c9634e787 (diff) | |
download | tor-0bec9f320b81a85ba3596e9780b1cf7c770dfb31.tar.gz tor-0bec9f320b81a85ba3596e9780b1cf7c770dfb31.zip |
Use %f, not %lf when formatting doubles
%f is correct; %lf is only needed with scanf. Apparently, on some
old BSDs, %lf is deprecated.
Didn't we do this before? Yes, we did. But we only got the
instances of %lf, not more complicated things like %.5lf . This
patch tries to get everything.
Based on a patch for 3894 by grarpamp.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index 1dd3d94fd0..f05186e319 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -838,7 +838,7 @@ rep_hist_record_mtbf_data(time_t now, int missing_means_down) format_iso_time(time_buf, hist->start_of_run); t = time_buf; } - PRINTF((f, "+MTBF %lu %.5lf%s%s\n", + PRINTF((f, "+MTBF %lu %.5f%s%s\n", hist->weighted_run_length, hist->total_run_weights, t ? " S=" : "", t ? t : "")); t = NULL; @@ -888,10 +888,10 @@ rep_hist_format_router_status(or_history_t *hist, time_t now) tor_asprintf(&cp, "%s%s%s" "%s%s%s" - "wfu %0.3lf\n" + "wfu %0.3f\n" " weighted-time %lu\n" " weighted-uptime %lu\n" - "mtbf %0.1lf\n" + "mtbf %0.1f\n" " weighted-run-length %lu\n" " total-run-weights %f\n", up?"uptime-started ":"", up?sor_buf:"", up?" UTC\n":"", |