diff options
| author | majbthrd <[email protected]> | 2019-12-30 10:12:18 -0600 |
|---|---|---|
| committer | Ha Thach <[email protected]> | 2019-12-30 23:12:18 +0700 |
| commit | 6b3eb5f17386d21b2b9f0bad2d1c06b73f07cb5f (patch) | |
| tree | 965ff25e7499877192d067fe4864aaa8859a3909 /src/common | |
| parent | db24b2f3728cc29af5b2688f9cd7ab0b4b3f22b5 (diff) | |
fix missing parentheses in TU_MIN and TU_MAX macros (#256)
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index 5700c1282..839989c92 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -39,8 +39,8 @@ // Macros Helper
//--------------------------------------------------------------------+
#define TU_ARRAY_SIZE(_arr) ( sizeof(_arr) / sizeof(_arr[0]) )
-#define TU_MIN(_x, _y) ( (_x) < (_y) ) ? (_x) : (_y) )
-#define TU_MAX(_x, _y) ( (_x) > (_y) ) ? (_x) : (_y) )
+#define TU_MIN(_x, _y) ( ( (_x) < (_y) ) ? (_x) : (_y) )
+#define TU_MAX(_x, _y) ( ( (_x) > (_y) ) ? (_x) : (_y) )
#define TU_U16_HIGH(u16) ((uint8_t) (((u16) >> 8) & 0x00ff))
#define TU_U16_LOW(u16) ((uint8_t) ((u16) & 0x00ff))
|
