define array size in a single place (trivial)
authorStefan Reinauer <stepan@coresystems.de>
Fri, 5 Sep 2008 15:18:15 +0000 (15:18 +0000)
committerStefan Reinauer <stepan@openbios.org>
Fri, 5 Sep 2008 15:18:15 +0000 (15:18 +0000)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3566 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

payloads/coreinfo/pci_module.c

index 3407cbe86d3c41eb2b6bc687a7053520c1dd1e85..5b1a9d8785f4f9184b39f2ef857cdfb5cf3507db 100644 (file)
@@ -29,7 +29,8 @@ struct pci_devices {
        unsigned int id;
 };
 
-static struct pci_devices devices[64];
+#define MAX_PCI_DEVICES 64
+static struct pci_devices devices[MAX_PCI_DEVICES];
 static int devices_index;
 
 /* Number of entries to show in the list */
@@ -190,7 +191,7 @@ static void pci_scan_bus(int bus)
                                continue;
 
                        /* FIXME: Remove this arbitrary limitation. */
-                       if (devices_index >= 64)
+                       if (devices_index >= MAX_PCI_DEVICES)
                                return;
 
                        devices[devices_index].device =