From 4e59799e1bfffabcbe6e9df1e90ef28bbb818e45 Mon Sep 17 00:00:00 2001 From: Don Lewis Date: Thu, 26 May 2016 21:44:52 +0000 Subject: [PATCH] Modify BOUND_VAR() macro to wrap all of its arguments in () and tweak its expression to work on powerpc and sparc64 (gcc compatibility). Correct a typo in a nearby comment. MFC after: 2 weeks (with r300779) --- sys/netpfil/ipfw/dn_aqm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfw/dn_aqm.h b/sys/netpfil/ipfw/dn_aqm.h index df1d187685d2..da47f00fae2a 100644 --- a/sys/netpfil/ipfw/dn_aqm.h +++ b/sys/netpfil/ipfw/dn_aqm.h @@ -52,9 +52,9 @@ typedef int32_t aqm_stime_t; #define DN_AQM_MTAG_TS 55345 /* Macro for variable bounding */ -#define BOUND_VAR(x,l,h) (x < l? l : x > h? h : x) +#define BOUND_VAR(x,l,h) ((x) > (h)? (h) : ((x) > (l)? (x) : (l))) -/* sysctl variable to count number of droped packets */ +/* sysctl variable to count number of dropped packets */ extern unsigned long io_pkt_drop; /*