linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftest/vm: uninitialized variable in main()
@ 2022-07-19  9:04 Dan Carpenter
  2022-07-19 17:23 ` Mina Almasry
  2022-07-20  4:24 ` Muchun Song
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-07-19  9:04 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: Andrew Morton, Shuah Khan, Muchun Song, Mina Almasry, linux-mm,
	linux-kselftest, kernel-janitors

Initialize "length" to zero by default.

Fixes: ff712a627f72 ("selftests/vm: cleanup hugetlb file after mremap test")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 tools/testing/selftests/vm/hugepage-mremap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/hugepage-mremap.c b/tools/testing/selftests/vm/hugepage-mremap.c
index 585978f181ed..e63a0214f639 100644
--- a/tools/testing/selftests/vm/hugepage-mremap.c
+++ b/tools/testing/selftests/vm/hugepage-mremap.c
@@ -107,7 +107,7 @@ static void register_region_with_uffd(char *addr, size_t len)
 
 int main(int argc, char *argv[])
 {
-	size_t length;
+	size_t length = 0;
 
 	if (argc != 2 && argc != 3) {
 		printf("Usage: %s [length_in_MB] <hugetlb_file>\n", argv[0]);
-- 
2.35.1



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

end of thread, other threads:[~2022-07-20  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19  9:04 [PATCH] selftest/vm: uninitialized variable in main() Dan Carpenter
2022-07-19 17:23 ` Mina Almasry
2022-07-20  4:24 ` Muchun Song

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 NNTP newsgroup(s).