From 0376a287fb64534fe94a0a05d0abd4f96bfdbea1 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sun, 2 Dec 2007 23:55:01 +0000 Subject: [PATCH] adjust bytes/sec calculation to not loose precision --- lib/dns/xfrin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 086afaa298..35ab8eddbf 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: xfrin.c,v 1.156 2007/12/02 23:47:01 marka Exp $ */ +/* $Id: xfrin.c,v 1.157 2007/12/02 23:55:01 marka Exp $ */ /*! \file */ @@ -1408,7 +1408,7 @@ maybe_free(dns_xfrin_ctx_t *xfr) { msecs = isc_time_microdiff(&xfr->end, &xfr->start) / 1000; if (msecs == 0) msecs = 1; - persec = xfr->nbytes / msecs / 1000; + persec = (xfr->nbytes * 1000) / msecs; xfrin_log(xfr, ISC_LOG_INFO, "Transfer completed: %d messages, %d records, " "%" ISC_PRINT_QUADFORMAT "u bytes, "