aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/powerpc/aim/mmu_oea.c2
-rw-r--r--sys/powerpc/aim/mmu_oea64.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index d4c88eb8941f..30cf21120572 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -749,7 +749,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
} while (pa < end);
}
- if (sizeof(phys_avail)/sizeof(phys_avail[0]) < regions_sz)
+ if (nitems(phys_avail) < regions_sz)
panic("moea_bootstrap: phys_avail too small");
phys_avail_count = 0;
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 90dedc7518cf..882bb247986f 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -768,7 +768,7 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelen
mem_regions(&pregions, &pregions_sz, &regions, &regions_sz);
CTR0(KTR_PMAP, "moea64_bootstrap: physical memory");
- if (sizeof(phys_avail)/sizeof(phys_avail[0]) < regions_sz)
+ if (nitems(phys_avail) < regions_sz)
panic("moea64_bootstrap: phys_avail too small");
phys_avail_count = 0;