mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-11-30 21:43:36 +08:00
memzero.h: Remove outdated comments
These comments were wrong. Remove them instead of fixing them, since now that we have this small header file, it's much easier to follow the preprocessor conditionals. 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:
parent
6b11077f09
commit
fca2fd65c0
@ -17,15 +17,15 @@
|
||||
|
||||
#ifdef HAVE_MEMSET_EXPLICIT
|
||||
# define memzero(ptr, size) memset_explicit((ptr), 0, (size))
|
||||
#elif defined HAVE_EXPLICIT_BZERO /* !HAVE_MEMSET_S */
|
||||
#elif defined HAVE_EXPLICIT_BZERO
|
||||
# define memzero(ptr, size) explicit_bzero((ptr), (size))
|
||||
#else /* !HAVE_MEMSET_S && HAVE_EXPLICIT_BZERO */
|
||||
#else
|
||||
static inline void memzero(void *ptr, size_t size)
|
||||
{
|
||||
ptr = memset(ptr, '\0', size);
|
||||
__asm__ __volatile__ ("" : : "r"(ptr) : "memory");
|
||||
}
|
||||
#endif /* !HAVE_MEMSET_S && !HAVE_EXPLICIT_BZERO */
|
||||
#endif
|
||||
|
||||
#define strzero(s) memzero(s, strlen(s)) /* warning: evaluates twice */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user