summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-12-01 10:03:53 +0000
committerThierry Vignaud <tv@mandriva.org>2009-12-01 10:03:53 +0000
commit6cf303ad1bb8b6560fe2fe2199d92529f98d2628 (patch)
tree781f2993854acbfa5683a12b18d138c5f132bd00
parenta0dbef1a26aa0fd5d6f3bc19c7b3d6b4d8d3e16d (diff)
downloadldetect-6cf303ad1bb8b6560fe2fe2199d92529f98d2628.tar
ldetect-6cf303ad1bb8b6560fe2fe2199d92529f98d2628.tar.gz
ldetect-6cf303ad1bb8b6560fe2fe2199d92529f98d2628.tar.bz2
ldetect-6cf303ad1bb8b6560fe2fe2199d92529f98d2628.tar.xz
ldetect-6cf303ad1bb8b6560fe2fe2199d92529f98d2628.zip
(pci_probe,usb_probe) comment
-rw-r--r--pci.c2
-rw-r--r--usb.c2
2 files changed, 4 insertions, 0 deletions
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);