summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libldetect-private.h3
-rw-r--r--pci.c2
-rw-r--r--usb.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/libldetect-private.h b/libldetect-private.h
index 400b846..9addd46 100644
--- a/libldetect-private.h
+++ b/libldetect-private.h
@@ -1,2 +1,5 @@
extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciusbtable, int no_subid);
extern void pciusb_initialize(struct pciusb_entry *e);
+
+#define MAX_DEVICES 100
+#define BUF_SIZE 512
diff --git a/pci.c b/pci.c
index 9aca845..0467b85 100644
--- a/pci.c
+++ b/pci.c
@@ -12,7 +12,7 @@ extern struct pciusb_entries pci_probe(int probe_type) {
char buf[512];
unsigned short devbusfn;
unsigned int id;
- struct pciusb_entry t[100];
+ struct pciusb_entry t[MAX_DEVICES];
struct pciusb_entries r;
if (!(f = fopen("/proc/bus/pci/devices", "r"))) exit(1);
diff --git a/usb.c b/usb.c
index 44ea5db..f7c2c7e 100644
--- a/usb.c
+++ b/usb.c
@@ -11,7 +11,7 @@ extern struct pciusb_entries usb_probe(void) {
char buf[512];
int line;
const char *file = "/proc/bus/usb/devices";
- struct pciusb_entry t[100];
+ struct pciusb_entry t[MAX_DEVICES];
struct pciusb_entries r;
struct pciusb_entry *e = NULL;