]> mj.ucw.cz Git - pciutils.git/commitdiff
Use xmalloc(), not malloc().
authorMartin Mares <mj@ucw.cz>
Tue, 23 Aug 2005 11:33:38 +0000 (11:33 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:27 +0000 (14:18 +0200)
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-71

ChangeLog
TODO
lspci.c

index 35078fc525e506db407e81820caf9a5cca30827a..27bc5c4c5f6ae88858afe7ebcfa5f13c73499ad7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-08-23  Martin Mares  <mj@ucw.cz>
 
+       * lspci.c: If alloca() is not available, use xmalloc(), not malloc().
+
        * lib/configure: Added x86_64 on Linux.
 
 2005-08-22  Martin Mares  <mj@ucw.cz>
diff --git a/TODO b/TODO
index 6ec9b0e410a670a1f22ee917992b3493dc055f7c..158602c1ac99f3f12b913fe980686f9d1be31823 100644 (file)
--- 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 3c7bc9b58a7ee93eb3eebdd5bc916cb7362b06db..e811b9e525d934ab4ef848da481b6d6455835ec1 100644 (file)
--- 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 */