From 273329d21ede8837cb26129816796ce41d505eb8 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 25 Jul 2002 13:37:12 +0000 Subject: don't copy struct pciusb_entries on the stack --- perl-install/c/stuff.xs.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 2253c419e..d2377d8f9 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -336,10 +336,10 @@ pci_probe(probe_type) EXTEND(SP, entries.nb); for (i = 0; i < entries.nb; i++) { - struct pciusb_entry e = entries.entries[i]; + struct pciusb_entry *e = &entries.entries[i]; snprintf(buf, sizeof(buf), "%04x\t%04x\t%04x\t%04x\t%d\t%d\t%d\t%s\t%s\t%s", - e.vendor, e.device, e.subvendor, e.subdevice, e.pci_bus, e.pci_device, e.pci_function, - pci_class2text(e.class_), e.module ? e.module : "unknown", e.text); + e->vendor, e->device, e->subvendor, e->subdevice, e->pci_bus, e->pci_device, e->pci_function, + pci_class2text(e->class_), e->module ? e->module : "unknown", e->text); PUSHs(sv_2mortal(newSVpv(buf, 0))); } pciusb_free(&entries); @@ -353,9 +353,9 @@ usb_probe() EXTEND(SP, entries.nb); for (i = 0; i < entries.nb; i++) { - struct pciusb_entry e = entries.entries[i]; + struct pciusb_entry *e = &entries.entries[i]; snprintf(buf, sizeof(buf), "%04x\t%04x\t%s\t%s\t%s", - e.vendor, e.device, usb_class2text(e.class_), e.module ? e.module : "unknown", e.text); + e->vendor, e->device, usb_class2text(e->class_), e->module ? e->module : "unknown", e->text); PUSHs(sv_2mortal(newSVpv(buf, 0))); } pciusb_free(&entries); -- cgit v1.2.1