From 447720b03b4ac37cbc1367bf3aad56711a30a307 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 18 May 2016 05:48:56 -0700 Subject: Clear destination buffer updated by the previous run Clear the destination buffer updated by the previous run in bench-memcpy.c and test-memcpy.c to catch the error when the following implementations do not copy anything. [BZ #19907] * benchtests/bench-memcpy.c (do_one_test): Clear the destination buffer updated by the previous run. * string/test-memcpy.c (do_one_test): Likewise. * benchtests/bench-memmove.c (do_one_test): Add a comment. * string/test-memmove.c (do_one_test): Likewise. --- string/test-memmove.c | 1 + 1 file changed, 1 insertion(+) (limited to 'string/test-memmove.c') diff --git a/string/test-memmove.c b/string/test-memmove.c index d2ab3f3c8d..43433297e5 100644 --- a/string/test-memmove.c +++ b/string/test-memmove.c @@ -68,6 +68,7 @@ static void do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src, size_t len) { + /* This also clears the destination buffer set by the previous run. */ memcpy (src, orig_src, len); #ifdef TEST_BCOPY CALL (impl, src, dst, len); -- cgit 1.4.1