diff mbox series

Fix error message in memmove test to display correct src pointer

Message ID 20210826154819.3081553-1-skpgkp2@gmail.com
State Committed
Commit d19b137b6a6b19411125c7a697bfab5bcddbdb65
Headers show
Series Fix error message in memmove test to display correct src pointer | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Sunil Pandey Aug. 26, 2021, 3:48 p.m. UTC
---
 string/test-memmove.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

H.J. Lu Aug. 26, 2021, 4:21 p.m. UTC | #1
On Thu, Aug 26, 2021 at 8:49 AM Sunil K Pandey <skpgkp2@gmail.com> wrote:
>
> ---
>  string/test-memmove.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/string/test-memmove.c b/string/test-memmove.c
> index 670094c9dc..02f2170bfd 100644
> --- a/string/test-memmove.c
> +++ b/string/test-memmove.c
> @@ -298,7 +298,7 @@ do_test2 (size_t offset)
>                 {
>                   error (0, 0,
>                          "Wrong result in function %s dst \"%p\" src \"%p\" offset \"%zd\"",
> -                        impl->name, dst, large_buf, i);
> +                        impl->name, dst, src, i);

large_buf == source is true only in the first iteration.

>                   ret = 1;
>                   munmap ((void *) large_buf, size);
>                   return;
> --
> 2.31.1
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
diff mbox series

Patch

diff --git a/string/test-memmove.c b/string/test-memmove.c
index 670094c9dc..02f2170bfd 100644
--- a/string/test-memmove.c
+++ b/string/test-memmove.c
@@ -298,7 +298,7 @@  do_test2 (size_t offset)
 		{
 		  error (0, 0,
 			 "Wrong result in function %s dst \"%p\" src \"%p\" offset \"%zd\"",
-			 impl->name, dst, large_buf, i);
+			 impl->name, dst, src, i);
 		  ret = 1;
 		  munmap ((void *) large_buf, size);
 		  return;