From: Alejandro Colomar Date: Mon, 31 Jul 2023 11:20:19 +0000 (+0200) Subject: memzero.h: Remove no-op assignment X-Git-Tag: 4.15.0-rc1~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=246edc0481298dfcce505fedbc5e429738fccde2;p=thirdparty%2Fshadow.git memzero.h: Remove no-op assignment memset(3) returns the input pointer. The assignment was effectively a no-op, and just confused the code. Cc: Christian Göttsche Cc: Serge Hallyn Cc: Iker Pedrosa Signed-off-by: Alejandro Colomar --- diff --git a/lib/memzero.h b/lib/memzero.h index c81cd0ce2..cf2f70204 100644 --- a/lib/memzero.h +++ b/lib/memzero.h @@ -28,7 +28,7 @@ memzero(void *ptr, size_t size) #elif defined(HAVE_EXPLICIT_BZERO) explicit_bzero(ptr, size); #else - ptr = memset(ptr, '\0', size); + memset(ptr, '\0', size); __asm__ __volatile__ ("" : : "r"(ptr) : "memory"); #endif }