diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index efc903d4ee04..ade07a118707 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -1407,7 +1407,7 @@ ATF_TC_BODY(largepage_mmap, tc) ATF_REQUIRE(munmap(addr, ps[i] == 0)); /* Clobber an anonymous mapping with a superpage. */ - addr1 = mmap(NULL, ps[0], PROT_READ | PROT_WRITE, + addr1 = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE | MAP_ALIGNED(ffsl(ps[i]) - 1), -1, 0); ATF_REQUIRE_MSG(addr1 != MAP_FAILED,