Browse Source

optimize explicit_bzero for size

Avoid saving/restoring the incoming argument by reusing memset return
value.
Alexander Monakov 6 years ago
parent
commit
b0d2b3a1e5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/string/explicit_bzero.c

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