Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2017 22:06:25 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320513 - head/sys/dev/mpt
Message-ID:  <201706302206.v5UM6Pgo043013@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rlibby
Date: Fri Jun 30 22:06:24 2017
New Revision: 320513
URL: https://svnweb.freebsd.org/changeset/base/320513

Log:
  mpt.h: macro parenthesization
  
  Build with gcc -Wint-in-bool-context revealed a macro parenthesization
  error (invoking mpt_lprt with a ternary expression for level).
  
  Reviewed by:	markj
  Approved by:	markj (mentor)
  Sponsored by:	Dell EMC Isilon
  Differential revision:	https://reviews.freebsd.org/D11412

Modified:
  head/sys/dev/mpt/mpt.h

Modified: head/sys/dev/mpt/mpt.h
==============================================================================
--- head/sys/dev/mpt/mpt.h	Fri Jun 30 22:04:10 2017	(r320512)
+++ head/sys/dev/mpt/mpt.h	Fri Jun 30 22:06:24 2017	(r320513)
@@ -932,14 +932,14 @@ enum {
 
 #define mpt_lprt(mpt, level, ...)		\
 do {						\
-	if (level <= (mpt)->verbose)		\
+	if ((level) <= (mpt)->verbose)		\
 		mpt_prt(mpt, __VA_ARGS__);	\
 } while (0)
 
 #if 0
 #define mpt_lprtc(mpt, level, ...)		\
 do {						\
-	if (level <= (mpt)->verbose)		\
+	if ((level) <= (mpt)->verbose)		\
 		mpt_prtc(mpt, __VA_ARGS__);	\
 } while (0)
 #endif



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