From a5325cb2d20ff88e41e8afbea1362486f490528d Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Mon, 15 May 2017 16:24:45 +0000 Subject: Put the closing parenthesis in the right spot and fix std-dev calculation --- sbin/pfctl/pfctl_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/pfctl') diff --git a/sbin/pfctl/pfctl_queue.c b/sbin/pfctl/pfctl_queue.c index 21e8d3e3dbc..feeeba33f8d 100644 --- a/sbin/pfctl/pfctl_queue.c +++ b/sbin/pfctl/pfctl_queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_queue.c,v 1.4 2017/05/15 11:23:25 mikeb Exp $ */ +/* $OpenBSD: pfctl_queue.c,v 1.5 2017/05/15 16:24:44 mikeb Exp $ */ /* * Copyright (c) 2003 - 2013 Henning Brauer @@ -219,7 +219,7 @@ pfctl_print_queue_nodestat(int dev, const struct pfctl_queue_node *node) avg = (double)fqstats->delaysum / (double)fqstats->flows; dev = sqrt(fmax(0, (double)fqstats->delaysumsq / - (double)fqstats->flows) - avg * avg); + (double)fqstats->flows - avg * avg)); } printf(" [ qlength: %3d/%3d avg delay: %.3fms std-dev: %.3fms" -- cgit v1.2.3