lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191204213203.163073-1-brianvv@google.com>
Date:   Wed,  4 Dec 2019 13:32:03 -0800
From:   Brian Vazquez <brianvv@...gle.com>
To:     Brian Vazquez <brianvv.kernel@...il.com>,
        David Ahern <dsahern@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>
Cc:     Mahesh Bandewar <maheshb@...gle.com>,
        Maciej Zenczykowski <maze@...gle.com>, netdev@...r.kernel.org,
        Brian Vazquez <brianvv@...gle.com>,
        Leslie Monis <lesliemonis@...il.com>
Subject: [PATCH iproute2 v2] tc: fix warning in tc/q_pie.c

Warning was:
q_pie.c:202:22: error: implicit conversion from 'unsigned long' to
'double'

Fixes: 492ec9558b30 ("tc: pie: change maximum integer value of tc_pie_xstats->prob")
Cc: Leslie Monis <lesliemonis@...il.com>
Signed-off-by: Brian Vazquez <brianvv@...gle.com>
---
 v2: rebase to current version.

 tc/q_pie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tc/q_pie.c b/tc/q_pie.c
index 935548a2..fda98a71 100644
--- a/tc/q_pie.c
+++ b/tc/q_pie.c
@@ -217,7 +217,7 @@ static int pie_print_xstats(struct qdisc_util *qu, FILE *f,
 	st = RTA_DATA(xstats);
 	/*prob is returned as a fracion of maximum integer value */
 	fprintf(f, "prob %f delay %uus",
-		(double)st->prob / UINT64_MAX, st->delay);
+		(double)st->prob / (double)UINT64_MAX, st->delay);
 
 	if (st->dq_rate_estimating)
 		fprintf(f, " avg_dq_rate %u\n", st->avg_dq_rate);
-- 
2.24.0.393.g34dc348eaf-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ