From b0d2b3a1e5820271c0f81d4c1fb8972a2f1141f5 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Thu, 28 Jun 2018 20:57:29 +0300 Subject: [PATCH] optimize explicit_bzero for size Avoid saving/restoring the incoming argument by reusing memset return value. --- src/string/explicit_bzero.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string/explicit_bzero.c b/src/string/explicit_bzero.c index 3d270040..f2e12f23 100644 --- a/src/string/explicit_bzero.c +++ b/src/string/explicit_bzero.c @@ -3,6 +3,6 @@ void explicit_bzero(void *d, size_t n) { - memset(d, 0, n); + d = memset(d, 0, n); __asm__ __volatile__ ("" : : "r"(d) : "memory"); } -- 2.40.0