From: Mark Andrews Date: Sun, 2 Dec 2007 23:55:01 +0000 (+0000) Subject: adjust bytes/sec calculation to not loose precision X-Git-Tag: v9.5.0~285 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=0376a287fb64534fe94a0a05d0abd4f96bfdbea1;p=thirdparty%2Fbind9.git adjust bytes/sec calculation to not loose precision --- diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 086afaa298a..35ab8eddbfe 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, "