arch/arm/src/lc823450: fully parenthesize MIN and MAX macros
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This commit is contained in:
parent
cd41ed9b6d
commit
7bc7b611d6
@ -39,11 +39,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(a,b) a > b ? a : b
|
||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a,b) a < b ? a : b
|
||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -56,7 +56,7 @@
|
||||
#define DVFS_LINELEN 128
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a,b) (a < b ? a : b)
|
||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SMP_NCPUS
|
||||
@ -286,7 +286,8 @@ static ssize_t dvfs_write(FAR struct file *filep, FAR const char *buffer,
|
||||
strncpy(line, buffer, n);
|
||||
line[n] = '\0';
|
||||
|
||||
n = MIN(strcspn(line, " "), sizeof(cmd) - 1);
|
||||
n = strcspn(line, " ");
|
||||
n = MIN(n, sizeof(cmd) - 1);
|
||||
strncpy(cmd, line, n);
|
||||
cmd[n] = '\0';
|
||||
|
||||
|
@ -141,12 +141,8 @@ int g_console_disable;
|
||||
# define HS_DMAACT_ACT2 3
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) > (b) ? a : b)
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) > (b) ? b : a)
|
||||
# define MIN(a, b) ((a) > (b) ? (b) : (a))
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -53,7 +53,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a, b) ((a) > (b) ? b : a)
|
||||
# define MIN(a, b) ((a) > (b) ? (b) : (a))
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -75,11 +75,7 @@
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a, b) ((a) > (b) ? (b) : (a))
|
||||
#endif /* MIN */
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif /* MIN */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
# define DPRINTF(fmt, args...) uinfo(fmt, ##args)
|
||||
|
Loading…
Reference in New Issue
Block a user