summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2004-07-05 15:41:26 +0000
committerMartin Mares <mj@ucw.cz>2006-05-05 14:18:22 +0200
commitec25b52dd43e5fc877f6a04e920ac862afe66b16 (patch)
treef345906e606f0cd61accc8ebb5ad6f248264d753 /common.c
parentd1fa27eb2d5ad0405f8fc957235249ed24d4e48f (diff)
downloadpciutils-ec25b52dd43e5fc877f6a04e920ac862afe66b16.tar.gz
Merged more PCI Express updates.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-53
Diffstat (limited to 'common.c')
-rw-r--r--common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common.c b/common.c
index a8d39d5..9181e4e 100644
--- a/common.c
+++ b/common.c
@@ -35,6 +35,15 @@ xmalloc(unsigned int howmuch)
return p;
}
+void *
+xrealloc(void *ptr, unsigned int howmuch)
+{
+ void *p = realloc(ptr, howmuch);
+ if (!p)
+ die("Unable to allocate %d bytes of memory", howmuch);
+ return p;
+}
+
int
parse_generic_option(int i, struct pci_access *pacc, char *optarg)
{