diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2018-06-28 20:57:29 +0300 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-07-02 17:14:54 -0400 |
commit | b0d2b3a1e5820271c0f81d4c1fb8972a2f1141f5 (patch) | |
tree | 6b51909e03f9593d87b245497dc20b7d01f83b2a /src | |
parent | 193338e619de7c993efa2c0e1a87240bd732c181 (diff) | |
download | musl-b0d2b3a1e5820271c0f81d4c1fb8972a2f1141f5.tar.gz musl-b0d2b3a1e5820271c0f81d4c1fb8972a2f1141f5.tar.bz2 musl-b0d2b3a1e5820271c0f81d4c1fb8972a2f1141f5.tar.xz musl-b0d2b3a1e5820271c0f81d4c1fb8972a2f1141f5.zip |
optimize explicit_bzero for size
Avoid saving/restoring the incoming argument by reusing memset return
value.
Diffstat (limited to 'src')
-rw-r--r-- | src/string/explicit_bzero.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); } |