Browse Source

optimize explicit_bzero for size

Avoid saving/restoring the incoming argument by reusing memset return
value.
Alexander Monakov 6 năm trước cách đây
mục cha
commit
b0d2b3a1e5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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");
 }