You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/08 18:58:53 UTC

[incubator-nuttx] 03/04: drivers/power/bq769x0.c: fully parenthesize MIN and MAX macros

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 6626699ec76c4f86a33b0060255c70f0d6c44f24
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Tue Dec 8 18:34:25 2020 +0200

    drivers/power/bq769x0.c: fully parenthesize MIN and MAX macros
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 drivers/power/bq769x0.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/power/bq769x0.c b/drivers/power/bq769x0.c
index 882f51a..19920ff 100644
--- a/drivers/power/bq769x0.c
+++ b/drivers/power/bq769x0.c
@@ -65,10 +65,7 @@
 /* Helpers ******************************************************************/
 
 #ifndef MIN
-#  define MIN(a,b) (a < b ? a : b)
-#endif
-#ifndef MAX
-#  define MAX(a,b) (a > b ? a : b)
+#  define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
 
 /* The CRC function expects to see address bytes as they appear on the wire */