]> mj.ucw.cz Git - pciutils.git/blobdiff - common.c
Updated fixed-version references to pci_fill_info
[pciutils.git] / common.c
index ed39b87148f6c726178f206f460c39c39975c56f..8ea52fa6d7b5398d2ff4a1c90cd9faa10ca410a7 100644 (file)
--- a/common.c
+++ b/common.c
@@ -44,6 +44,15 @@ xrealloc(void *ptr, unsigned int howmuch)
   return p;
 }
 
+char *
+xstrdup(char *str)
+{
+  int len = strlen(str) + 1;
+  char *copy = xmalloc(len);
+  memcpy(copy, str, len);
+  return copy;
+}
+
 static void
 set_pci_method(struct pci_access *pacc, char *arg)
 {