optimize explicit_bzero for size

Avoid saving/restoring the incoming argument by reusing memset return
value.
This commit is contained in:
Alexander Monakov 2018-06-28 20:57:29 +03:00 committed by Rich Felker
parent 193338e619
commit b0d2b3a1e5

View file

@ -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");
}