Message ID | 1612331100-30275-1-git-send-email-xuyang2018.jy@cn.fujitsu.com |
---|---|
State | New |
Headers | show |
Series | tst-mallinfo2.c: Use correct multiple for total variable | expand |
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 ();
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(-)