hv: bugfix in min() and max() MACROs

These two MACROs shall be wrapped as a single
 value respectively, hence brackets should be used.

Tracked-On: #5951
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang 2021-04-22 14:47:54 +08:00 committed by wenlingz
parent afd0b7e8db
commit 6d5759a260

View File

@ -18,9 +18,9 @@
/** Roundup (x) to (y) aligned **/
#define roundup(x, y) (((x) + ((y) - 1UL)) & (~((y) - 1UL)))
#define min(x, y) ((x) < (y)) ? (x) : (y)
#define min(x, y) (((x) < (y)) ? (x) : (y))
#define max(x, y) ((x) < (y)) ? (y) : (x)
#define max(x, y) (((x) < (y)) ? (y) : (x))
/** Replaces 'x' by the string "x". */
#define STRINGIFY(x) #x