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 <cgzones@googlemail.com>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2023-07-31 13:20:19 +02:00
committed by Iker Pedrosa
parent 2daa6cc65d
commit 246edc0481

View File

@@ -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
}