Skip to content

Commit 588ae90

Browse files
committed
reduce-local: add parans around min/max macro
The expression `max_k < min(a, b)` may not produce what we think it does. Signed-off-by: Joseph Schuchart <[email protected]>
1 parent ef93ff4 commit 588ae90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/datatype/reduce_local.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ static int do_ops[12] = {
5959
static int verbose = 0;
6060
static int total_errors = 0;
6161

62-
#define max(a, b) (a) > (b) ? (a) : (b)
62+
#define max(a, b) ((a) > (b) ? (a) : (b))
6363

64-
#define min(a, b) (a) < (b) ? (a) : (b)
64+
#define min(a, b) ((a) < (b) ? (a) : (b))
6565

6666
static void print_status(char *op, char *type, int type_size, int count, int max_shift,
6767
double *duration, int repeats, int correct)

0 commit comments

Comments
 (0)