aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Common
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-08-23 10:39:04 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-08-23 10:39:04 +0000
commitbb56a60f7a158382de0c1db4da55a12393b417a3 (patch)
tree8407b1a1e71021bca28abd4784804251733f4ed5 /LUFA/Common
parente1ed5e7952461348ed6fc8ffcad1843174de4a86 (diff)
Minor documentation fixes.
Add extra parenthesis around terms in the common MIN() and MAX() macros to prevent issues with non-trivial macro inputs (thanks to David Lyons). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1913 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Common')
-rw-r--r--LUFA/Common/Common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h
index e38d63ef..43df9fbe 100644
--- a/LUFA/Common/Common.h
+++ b/LUFA/Common/Common.h
@@ -160,7 +160,7 @@
* \return The larger of the two input parameters
*/
#if !defined(MAX) || defined(__DOXYGEN__)
- #define MAX(x, y) ((x > y) ? x : y)
+ #define MAX(x, y) (((x) > (y)) ? (x) : (y))
#endif
/** Convenience macro to determine the smaller of two values.
@@ -174,7 +174,7 @@
* \return The smaller of the two input parameters
*/
#if !defined(MIN) || defined(__DOXYGEN__)
- #define MIN(x, y) ((x < y) ? x : y)
+ #define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif
#if !defined(STRINGIFY) || defined(__DOXYGEN__)