From 4362a14309f6746023bdee7d069e93f178b18147 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 25 Nov 2025 17:47:35 -0700 Subject: [PATCH] Revert "handy.h: Add void * casts to memEQ, memNE" This reverts commit 9d3980bc229750e6c07726fe529f02bf4dc6a5a5. It can create problems to add casts to macros; potentially hiding real issues. These casts caused Tony Cook some lost time recently; whatever the cause for this commit isn't showing up on my box; so I'll try reverting it to see if something shows up on some other platform. --- handy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handy.h b/handy.h index 0ada57f2d2e3..33d3aff5751e 100644 --- a/handy.h +++ b/handy.h @@ -683,8 +683,8 @@ based on the underlying C library functions): #define strnNE(s1,s2,l) (strncmp(s1,s2,l) != 0) #define strnEQ(s1,s2,l) (strncmp(s1,s2,l) == 0) -#define memEQ(s1,s2,l) (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0) -#define memNE(s1,s2,l) (! memEQ(s1,s2,l)) +#define memNE(s1,s2,l) (memcmp(s1,s2,l) != 0) +#define memEQ(s1,s2,l) (memcmp(s1,s2,l) == 0) /* memEQ and memNE where second comparand is a string constant */ #define memEQs(s1, l, s2) \