tst-mallinfo2.c: Use correct multiple for total variable

Message ID 1612331100-30275-1-git-send-email-xuyang2018.jy@cn.fujitsu.com
State Superseded
Headers
Series tst-mallinfo2.c: Use correct multiple for total variable |

Commit Message

Yang Xu Feb. 3, 2021, 5:45 a.m. UTC
  Since test uses 160 multiple for malloc size, we should also use 160 multiple
for total variable instead of 16, then comparison is meaningful. So fix it.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 malloc/tst-mallinfo2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/malloc/tst-mallinfo2.c b/malloc/tst-mallinfo2.c
index 59a15cf7a8..a2a2550931 100644
--- a/malloc/tst-mallinfo2.c
+++ b/malloc/tst-mallinfo2.c
@@ -68,7 +68,7 @@  do_test (void)
   for (i = 1; i < 20; ++i)
     {
       ptr = malloc (160 * i);
-      total += 16 * i;
+      total += 160 * i;
     }
 
   mi2 = mallinfo2 ();