From 7bbb8f0c68bc240ad5e99691d91ae67876a09706 Mon Sep 17 00:00:00 2001 From: Alexander Yurchenko Date: Mon, 2 May 2005 11:30:26 +0000 Subject: Don't hardcode sizeof(pcireg_t) value. ok markus@ --- sys/dev/pci/pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index c2115e2c48e..8d6e4b9e587 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.36 2004/12/08 15:38:41 markus Exp $ */ +/* $OpenBSD: pci.c,v 1.37 2005/05/02 11:30:25 grange Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* @@ -58,7 +58,8 @@ struct pci_softc { #endif }; -#define NMAPREG ((PCI_MAPREG_END - PCI_MAPREG_START) / 4) +#define NMAPREG ((PCI_MAPREG_END - PCI_MAPREG_START) / \ + sizeof(pcireg_t)) struct pci_dev { LIST_ENTRY(pci_dev) pd_next; struct device *pd_dev; -- cgit v1.2.3