From owner-svn-src-head@freebsd.org Thu May 26 21:44:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45377B4C631; Thu, 26 May 2016 21:44:53 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1679D1A52; Thu, 26 May 2016 21:44:53 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4QLiq1V035960; Thu, 26 May 2016 21:44:52 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4QLiqT8035959; Thu, 26 May 2016 21:44:52 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201605262144.u4QLiqT8035959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 26 May 2016 21:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300781 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2016 21:44:53 -0000 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; /*