[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] libfsimage: fix parentheses in macro parameters


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 13 Mar 2020 09:45:58 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 13 Mar 2020 08:46:27 +0000
  • Ironport-sdr: l1i59W7ooNQ1IGF9SQi73SGyl0CXyhnlSIduFJ+CXhCxLBInLPSDfveriJJ6q86wmzj+sf9E67 ylwxsD7MywbwQp7TJRZ6Bj7mgsxLEx8wyRlWI230g8yrliSg+zKw+0wz6pMlf1zkwiunzxFp9H lK/vrzzl6H/sySBGpUFb3KGT2s7H2oIYAWnL3IpKdQaHH4jAeuVcPnvNK9LC+EUabsJtV1n/vk t7CpW+URlzhwJvIEnm7SDdRaDCYqcZd7cDgCRKxFqX5V+SfJ8rzntgZoulfChoO1c3p/j9FmEg GnI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---
 tools/libfsimage/zfs/fsys_zfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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); \
        }
-- 
2.25.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.