mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 15:02:13 +00:00
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:
parent
afd0b7e8db
commit
6d5759a260
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user