Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2016 21:44:52 +0000 (UTC)
From:      Don Lewis <truckman@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300781 - head/sys/netpfil/ipfw
Message-ID:  <201605262144.u4QLiqT8035959@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: truckman
Date: Thu May 26 21:44:52 2016
New Revision: 300781
URL: https://svnweb.freebsd.org/changeset/base/300781

Log:
  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)

Modified:
  head/sys/netpfil/ipfw/dn_aqm.h

Modified: head/sys/netpfil/ipfw/dn_aqm.h
==============================================================================
--- head/sys/netpfil/ipfw/dn_aqm.h	Thu May 26 21:43:22 2016	(r300780)
+++ head/sys/netpfil/ipfw/dn_aqm.h	Thu May 26 21:44:52 2016	(r300781)
@@ -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; 
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605262144.u4QLiqT8035959>