]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Do not add a pointer to the NULL constant
authorGuillem Jover <guillem@hadrons.org>
Tue, 14 Nov 2023 18:15:11 +0000 (19:15 +0100)
committerGuillem Jover <guillem@hadrons.org>
Sun, 7 Jan 2024 15:45:46 +0000 (16:45 +0100)
Warned-by: cppcheck (nullPointerArithmetic)
src/merge.c

index c43866f2d52e1b4289be172c6c9fc5c0d345fa45..3f1b3fb3e3c22b4668f26ef3a2af9e0a00e96090 100644 (file)
@@ -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.