mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libfsimage: fix parentheses in macro parameters
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> Acked-by: Wei Liu <wl@xen.org>
This commit is contained in:
1 parent
e54c433adf
commit
76416c459c
1 file changed
+2
-2
@@ -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); \
|
||||
}
|
||||
|
||||