]> git.ipfire.org Git - thirdparty/shadow.git/commit
memzero.h: Add MEMZERO() macro
authorAlejandro Colomar <alx@kernel.org>
Sun, 30 Jul 2023 12:32:39 +0000 (14:32 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 1 Sep 2023 07:39:23 +0000 (09:39 +0200)
commit64ab4012398343e474e61fc4214dccb37f9ee994
tree82360525cd27908cb2700dba4a3238141e31bd1c
parente29994218960382fea8854d58e44af3b5a405f94
memzero.h: Add MEMZERO() macro

It calculates the size of the array safely, via SIZEOF_ARRAY(), instead of
sizeof(), which can be dangerous.

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>
lib/memzero.h