Explorar el Código

optimize explicit_bzero for size

Avoid saving/restoring the incoming argument by reusing memset return
value.
Alexander Monakov hace 6 años
padre
commit
b0d2b3a1e5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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");
 }