]> git.ipfire.org Git - thirdparty/shadow.git/commit
memzero.[ch]: Define memzero() and strzero() as inline functions
authorAlejandro Colomar <alx@kernel.org>
Sun, 30 Jul 2023 11:30:47 +0000 (13:30 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 1 Sep 2023 07:39:23 +0000 (09:39 +0200)
commit2daa6cc65d51b8360517a896e7a06bfd46de8a6e
tree8d5f3d9c3224965aa9c953b05418e7c44d6e91b7
parentfca2fd65c08c2012e5c3ccc0fceb588f07c920cc
memzero.[ch]: Define memzero() and strzero() as inline functions

There's no need to have these as macros, so use functions, which are a
lot safer: there's no need to worry about multiple evaluation of args,
and there's also more type safety.  Compiler warnings are also simpler,
as they don't dump all the nested macros.

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/Makefile.am
lib/memzero.c [new file with mode: 0644]
lib/memzero.h