From 2d665c8822a38b8432f3b622a88886b7b48effbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bastien=20Roucari=C3=A8s?= Date: Tue, 14 Apr 2020 00:48:16 +0200 Subject: [PATCH] explicit_bzero: Improve code style. * lib/explicit_bzero.c (explicit_bzero): Use '\0' instead of 0. --- ChangeLog | 5 +++++ lib/explicit_bzero.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0d4b34e39d..36f4270c3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-04-13 Bastien Roucariès + + explicit_bzero: Improve code style. + * lib/explicit_bzero.c (explicit_bzero): Use '\0' instead of 0. + 2020-04-13 Bastien Roucariès explicit_bzero: On native Windows, use SecureZeroMemory(). diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c index 4897327918..b1df418e53 100644 --- a/lib/explicit_bzero.c +++ b/lib/explicit_bzero.c @@ -51,7 +51,7 @@ explicit_bzero (void *s, size_t len) #if defined _WIN32 && !defined __CYGWIN__ (void) SecureZeroMemory (s, len); #elif HAVE_EXPLICIT_MEMSET - explicit_memset (s, 0, len); + explicit_memset (s, '\0', len); #elif HAVE_MEMSET_S (void) memset_s (s, len, '\0', len); #else -- 2.39.5