public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] tst-mallinfo2.c: Use correct multiple for total variable
@ 2021-02-03  5:45 Yang Xu
  2021-02-03 22:31 ` DJ Delorie
  0 siblings, 1 reply; 10+ messages in thread
From: Yang Xu @ 2021-02-03  5:45 UTC (permalink / raw)
  To: libc-alpha; +Cc: Yang Xu

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(-)

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 ();
-- 
2.23.0




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-05-25 20:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03  5:45 [PATCH] tst-mallinfo2.c: Use correct multiple for total variable Yang Xu
2021-02-03 22:31 ` DJ Delorie
2021-02-04  1:30   ` Yang Xu
2021-02-16  3:44     ` DJ Delorie
2021-02-18  2:38       ` Yang Xu
2021-02-18  2:56       ` [PATCH v2] " Yang Xu
2021-02-23  2:29         ` Carlos O'Donell
2021-05-11  5:52           ` xuyang2018.jy
2021-05-19  0:32             ` naohirot
2021-05-25 20:49               ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).