From: Brian Behlendorf Date: Tue, 10 Oct 2017 15:59:17 +0000 (-0700) Subject: Add parenthesis to btop and ptob macros X-Git-Tag: zfs-0.8.0-rc1~152^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0cefc9dbcd9de8a35c51e172edabf2f2ecf15f92;p=zfs Add parenthesis to btop and ptob macros Add missing parenthesis around btop and ptob macros to ensure operation ordering is preserved after expansion. Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Signed-off-by: Brian Behlendorf Closes #660 --- diff --git a/include/sys/param.h b/include/sys/param.h index 2c9fcd8e9..10bf96588 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -28,8 +28,8 @@ #include /* Pages to bytes and back */ -#define ptob(pages) (pages << PAGE_SHIFT) -#define btop(bytes) (bytes >> PAGE_SHIFT) +#define ptob(pages) ((pages) << PAGE_SHIFT) +#define btop(bytes) ((bytes) >> PAGE_SHIFT) #define MAXUID UINT32_MAX