[2/2] libfsimage: fix parentheses in macro parameters
diff mbox series

Message ID 20200313084558.13759-2-roger.pau@citrix.com
State New
Headers show
Series
  • Untitled series #255913
Related show

Commit Message

Roger Pau Monné March 13, 2020, 8:45 a.m. UTC
VERIFY_DN_TYPE and VERIFY_OS_TYPE should use parentheses when
accessing the type parameter. Note that none of the current usages
require this, it's just done for correctness.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 tools/libfsimage/zfs/fsys_zfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/tools/libfsimage/zfs/fsys_zfs.h b/tools/libfsimage/zfs/fsys_zfs.h
index 721972a05a..b4be51b50d 100644
--- a/tools/libfsimage/zfs/fsys_zfs.h
+++ b/tools/libfsimage/zfs/fsys_zfs.h
@@ -71,7 +71,7 @@  typedef	unsigned int size_t;
  * Can only be used in functions returning non-0 for failure.
  */
 #define	VERIFY_DN_TYPE(dnp, type) \
-	if (type != DMU_OT_NONE && (dnp)->dn_type != type) { \
+	if ((type) != DMU_OT_NONE && (dnp)->dn_type != (type)) { \
 		return (ERR_FSYS_CORRUPT); \
 	}
 
@@ -80,7 +80,7 @@  typedef	unsigned int size_t;
  * Can only be used in functions returning 0 for failure.
  */
 #define	VERIFY_OS_TYPE(osp, type) \
-	if (type != DMU_OST_NONE && (osp)->os_type != type) { \
+	if ((type) != DMU_OST_NONE && (osp)->os_type != (type)) { \
 		errnum = ERR_FSYS_CORRUPT; \
 		return (0); \
 	}