diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-08-30 20:42:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-08-30 20:44:42 -0400 |
commit | 393e4fb5b5529c666438ef04ebd076f90dd287fa (patch) | |
tree | a38b5288d5a6a8374d9e4b7e79d8f7745891aa8f /src/or/rephist.c | |
parent | 561ab14a5ed64dd3994fe23073e74efa3498e589 (diff) | |
download | tor-393e4fb5b5529c666438ef04ebd076f90dd287fa.tar.gz tor-393e4fb5b5529c666438ef04ebd076f90dd287fa.zip |
Use %f with printf-style formatting, not %lf
For printf, %f and %lf are synonymous, since floats are promoted to
doubles when passed as varargs. It's only for scanf that we need to
say "%lf" for doubles and "%f" for floats.
Apparenly, some older compilers think it's naughty to say %lf and like
to spew warnings about it.
Found by grarpamp.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index 24447004ef..1dd3d94fd0 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -445,7 +445,7 @@ rep_hist_downrate_old_runs(time_t now) alpha *= STABILITY_ALPHA; } - log_info(LD_HIST, "Discounting all old stability info by a factor of %lf", + log_info(LD_HIST, "Discounting all old stability info by a factor of %f", alpha); /* Multiply every w_r_l, t_r_w pair by alpha. */ @@ -893,7 +893,7 @@ rep_hist_format_router_status(or_history_t *hist, time_t now) " weighted-uptime %lu\n" "mtbf %0.1lf\n" " weighted-run-length %lu\n" - " total-run-weights %lf\n", + " total-run-weights %f\n", up?"uptime-started ":"", up?sor_buf:"", up?" UTC\n":"", down?"downtime-started ":"", down?sod_buf:"", down?" UTC\n":"", wfu, |