aboutsummaryrefslogtreecommitdiff
path: root/src/or/geoip.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-16 14:26:35 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-16 14:26:35 -0400
commit0bec9f320b81a85ba3596e9780b1cf7c770dfb31 (patch)
tree2323efba21ab2671212ab05361869f2ad1f9411a /src/or/geoip.c
parent75fc4dbbcabaedc715f0f9e883ccab1c9634e787 (diff)
downloadtor-0bec9f320b81a85ba3596e9780b1cf7c770dfb31.tar
tor-0bec9f320b81a85ba3596e9780b1cf7c770dfb31.tar.gz
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/geoip.c')
-rw-r--r--src/or/geoip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index c51142c82..8fb4c98fb 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -1026,9 +1026,9 @@ geoip_dirreq_stats_write(time_t now)
memset(ns_v2_responses, 0, sizeof(ns_v2_responses));
memset(ns_v3_responses, 0, sizeof(ns_v3_responses));
if (!geoip_get_mean_shares(now, &v2_share, &v3_share)) {
- if (fprintf(out, "dirreq-v2-share %0.2lf%%\n", v2_share*100) < 0)
+ if (fprintf(out, "dirreq-v2-share %0.2f%%\n", v2_share*100) < 0)
goto done;
- if (fprintf(out, "dirreq-v3-share %0.2lf%%\n", v3_share*100) < 0)
+ if (fprintf(out, "dirreq-v3-share %0.2f%%\n", v3_share*100) < 0)
goto done;
}