From 6cf303ad1bb8b6560fe2fe2199d92529f98d2628 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 1 Dec 2009 10:03:53 +0000 Subject: (pci_probe,usb_probe) comment --- pci.c | 2 ++ usb.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pci.c b/pci.c index 1609fe7..68c07af 100644 --- a/pci.c +++ b/pci.c @@ -98,6 +98,8 @@ extern struct pciusb_entries pci_probe(void) { } } + + /* shrink to real size */ r.entries = realloc(r.entries, sizeof(struct pciusb_entry) * r.nb); pci_cleanup(pacc); diff --git a/usb.c b/usb.c index c7f6503..2d5b77f 100644 --- a/usb.c +++ b/usb.c @@ -135,6 +135,8 @@ extern struct pciusb_entries usb_probe(void) { build_text(e, vendor_text, product_text); fclose(f); + + /* shrink to real size */ r.entries = realloc(r.entries, sizeof(struct pciusb_entry) * r.nb); pciusb_find_modules(&r, "usbtable", DO_NOT_LOAD, 0); -- cgit v1.2.1