Skip to content

Commit 5863d27

Browse files
committed
Revert "handy.h: Add void * casts to memEQ, memNE"
This reverts commit 9d3980b. 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.
1 parent 343b977 commit 5863d27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

handy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,8 @@ based on the underlying C library functions):
690690
#define strnNE(s1,s2,l) (strncmp(s1,s2,l) != 0)
691691
#define strnEQ(s1,s2,l) (strncmp(s1,s2,l) == 0)
692692

693-
#define memEQ(s1,s2,l) (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0)
694-
#define memNE(s1,s2,l) (! memEQ(s1,s2,l))
693+
#define memNE(s1,s2,l) (memcmp(s1,s2,l) != 0)
694+
#define memEQ(s1,s2,l) (memcmp(s1,s2,l) == 0)
695695

696696
/* memEQ and memNE where second comparand is a string constant */
697697
#define memEQs(s1, l, s2) \

0 commit comments

Comments
 (0)