summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-21 15:38:28 +0000
committerpfg <pfg@FreeBSD.org>2016-04-21 15:38:28 +0000
commitfc65edc1cd05de15ef17e14dc54c2bf6c41ccab8 (patch)
tree45622d9ce5a6c394316a37f672cfd0a033c48374 /sys/mips
parentfdf39652a42767663d4a74a1a367d193185c51e9 (diff)
downloadFreeBSD-src-fc65edc1cd05de15ef17e14dc54c2bf6c41ccab8.zip
FreeBSD-src-fc65edc1cd05de15ef17e14dc54c2bf6c41ccab8.tar.gz
Remove slightly used const values that can be replaced with nitems().
Suggested by: jhb
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/nlm/xlp_machdep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/mips/nlm/xlp_machdep.c b/sys/mips/nlm/xlp_machdep.c
index dde6a74..5f93d6c 100644
--- a/sys/mips/nlm/xlp_machdep.c
+++ b/sys/mips/nlm/xlp_machdep.c
@@ -441,11 +441,10 @@ static vm_paddr_t xlp_mem_excl[] = {
static int
mem_exclude_add(vm_paddr_t *avail, vm_paddr_t mstart, vm_paddr_t mend)
{
- int nreg = sizeof(xlp_mem_excl)/sizeof(xlp_mem_excl[0]);
int i, pos;
pos = 0;
- for (i = 0; i < nreg; i += 2) {
+ for (i = 0; i < nitems(xlp_mem_excl); i += 2) {
if (mstart > xlp_mem_excl[i + 1])
continue;
if (mstart < xlp_mem_excl[i]) {
OpenPOWER on IntegriCloud