From: Martin Mares Date: Tue, 23 Aug 2005 11:33:38 +0000 (+0000) Subject: Use xmalloc(), not malloc(). X-Git-Tag: v3.0.0~94 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=8afaab22baf6fe168bc1f03d062bfc4c0a81f13c;p=pciutils.git Use xmalloc(), not malloc(). git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-71 --- diff --git a/ChangeLog b/ChangeLog index 35078fc..27bc5c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-08-23 Martin Mares + * lspci.c: If alloca() is not available, use xmalloc(), not malloc(). + * lib/configure: Added x86_64 on Linux. 2005-08-22 Martin Mares diff --git a/TODO b/TODO index 6ec9b0e..158602c 100644 --- a/TODO +++ b/TODO @@ -9,6 +9,8 @@ - update the web page +- unused parameter warnings + PCIIDS: - another mirror at Atrey? - delete old DB at SF @@ -20,3 +22,4 @@ MERGES: - SuSE: synced - MDK: synced - Slack: obsolete +- make path to pci.ids customizable diff --git a/lspci.c b/lspci.c index 3c7bc9b..e811b9e 100644 --- a/lspci.c +++ b/lspci.c @@ -49,13 +49,14 @@ GENERIC_HELP static struct pci_access *pacc; /* - * If we aren't being compiled by GCC, use malloc() instead of alloca(). + * If we aren't being compiled by GCC, use xmalloc() instead of alloca(). * This increases our memory footprint, but only slightly since we don't * use alloca() much. */ #ifndef __GNUC__ -#define alloca malloc +#undef alloca +#define alloca xmalloc #endif /* Our view of the PCI bus */