Commit ecb44e165514885648240c1b139c4ab0c212a0fa

Guillem Jover 2023-11-14T19:15:11

Do not add a pointer to the NULL constant Warned-by: cppcheck (nullPointerArithmetic)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/merge.c b/src/merge.c
index c43866f..3f1b3fb 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -84,9 +84,8 @@ static void insertionsort(unsigned char *, size_t, size_t,
  */
 /* Assumption: PSIZE is a power of 2. */
 #define EVAL(p) (unsigned char **)					\
-	((unsigned char *)0 +						\
 	 (((unsigned char *)p + PSIZE - 1 -				\
-	   (unsigned char *)0) & ~(PSIZE - 1)))
+	   (unsigned char *)0) & ~(PSIZE - 1))
 
 /*
  * Arguments are as for qsort.