[LTP] [PATCH] lib/tst_test.c: Use %u instead of %lu for tmpfs_size

Yang Xu xuyang2018.jy@fujitsu.com
Thu Oct 14 04:14:11 CEST 2021


Fixes: 21c8759f4 ("lib: adjust the tmpfs size according to .dev_min_size and MemAvailable")
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 lib/tst_test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index ec80e17a6..02ae28335 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -906,11 +906,11 @@ static const char *limit_tmpfs_mount_size(const char *mnt_data,
 		tst_brk(TCONF, "No enough memory for tmpfs use");
 
 	if (mnt_data)
-		snprintf(buf, buf_size, "%s,size=%luM", mnt_data, tmpfs_size);
+		snprintf(buf, buf_size, "%s,size=%uM", mnt_data, tmpfs_size);
 	else
-		snprintf(buf, buf_size, "size=%luM", tmpfs_size);
+		snprintf(buf, buf_size, "size=%uM", tmpfs_size);
 
-	tst_res(TINFO, "Limiting tmpfs size to %luMB", tmpfs_size);
+	tst_res(TINFO, "Limiting tmpfs size to %uMB", tmpfs_size);
 
 	return buf;
 }
-- 
2.23.0



More information about the ltp mailing list