Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/zlib: drop EQUAL macro

The macro is prehistoric, and only exists to help those readers who don't
know what memcmp() returns if memory areas differ. This is pretty well
documented, so the macro looks excessive.

Now that the only user of the macro depends on DEBUG_ZLIB config, GCC
warns about unused macro if the library is built with W=2 against
defconfig. So drop it for good.

Link: https://lkml.kernel.org/r/20250205212933.68695-1-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Cc: Heiko Carsten <heiko.carstens@de.ibm.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Yury Norov and committed by
Andrew Morton
b115b6ec 6ba31721

+1 -5
+1 -5
lib/zlib_deflate/deflate.c
··· 151 151 * meaning. 152 152 */ 153 153 154 - #define EQUAL 0 155 - /* result of memcmp for equal strings */ 156 - 157 154 /* =========================================================================== 158 155 * Update a hash value with the given input byte 159 156 * IN assertion: all calls to UPDATE_HASH are made with consecutive ··· 710 713 ) 711 714 { 712 715 /* check that the match is indeed a match */ 713 - if (memcmp((char *)s->window + match, 714 - (char *)s->window + start, length) != EQUAL) { 716 + if (memcmp((char *)s->window + match, (char *)s->window + start, length)) { 715 717 fprintf(stderr, " start %u, match %u, length %d\n", 716 718 start, match, length); 717 719 do {