summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorKenjiro Cho <kjc@cvs.openbsd.org>2002-09-08 09:09:55 +0000
committerKenjiro Cho <kjc@cvs.openbsd.org>2002-09-08 09:09:55 +0000
commit85e069ce9aafde0883c1f3bd8b7754d8e4c1cd2b (patch)
treea5ed876961fe880b37e2828a8f449d0b37bd6231 /usr.sbin
parent0f7c25c4b735239e439cd06e099c7611d45ea8f6 (diff)
use HUGE_VAL defined in <math.h> instead of 1e500 for positive infinity.
gcc -pedantic audit by deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/altq/libaltq/qop_hfsc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/altq/libaltq/qop_hfsc.c b/usr.sbin/altq/libaltq/qop_hfsc.c
index fa890223c90..9a3ad333066 100644
--- a/usr.sbin/altq/libaltq/qop_hfsc.c
+++ b/usr.sbin/altq/libaltq/qop_hfsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qop_hfsc.c,v 1.3 2001/12/03 08:38:48 kjc Exp $ */
+/* $OpenBSD: qop_hfsc.c,v 1.4 2002/09/08 09:09:54 kjc Exp $ */
/* $KAME: qop_hfsc.c,v 1.6 2001/08/16 10:39:14 kjc Exp $ */
/*
* Copyright (C) 1999-2000
@@ -44,6 +44,7 @@
#include <errno.h>
#include <syslog.h>
#include <netdb.h>
+#include <math.h>
#include <altq/altq.h>
#include <altq/altq_hfsc.h>
@@ -668,7 +669,7 @@ validate_sc(struct service_curve *sc)
/*
* admission control using generalized service curve
*/
-#define INFINITY 1e500 /* IEEE: positive infinity */
+#define INFINITY HUGE_VAL /* positive infinity defined in <math.h> */
/* add a new service curve to a generilized service curve */
static void