summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2012-02-24 09:39:31 +0100
committerJeremy Huddleston <jeremyhu@apple.com>2012-02-24 14:22:04 -0800
commit2a58cd13c3d14cd2ea57826b56e9906ecfc5648a (patch)
tree8201229d2724638ae4852a2105372128785264cc
parent167ffb1c4e431763e30c894131e704bb3599c7c1 (diff)
Use correct type for pci_id file accessor functions
This fixes the compiler warning of using the wrong type for gzgets() and gzclose() as they want a gzFile argument, not a pointer to gzFile. The abstraction layer pci_id_file should just abstract the full type. Signed-off-by: Mathias Krause <mathias.krause@secunet.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--src/common_device_name.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common_device_name.c b/src/common_device_name.c
index 8feaf69..b2765dd 100644
--- a/src/common_device_name.c
+++ b/src/common_device_name.c
@@ -69,7 +69,7 @@ pci_id_file_open(void)
#define pci_id_file_gets(l, s, f) gzgets(f, l, s)
#define pci_id_file_close(f) gzclose(f)
#else
-typedef FILE pci_id_file;
+typedef FILE * pci_id_file;
#define pci_id_file_open() fopen(PCIIDS_PATH "/pci.ids", "r")
#define pci_id_file_gets(l, s, f) fgets(l, s, f)
#define pci_id_file_close(f) fclose(f)
@@ -189,7 +189,7 @@ insert( uint16_t vendor )
static void
populate_vendor( struct pci_id_leaf * vend, int fill_device_data )
{
- pci_id_file * f;
+ pci_id_file f;
char buf[128];
unsigned vendor = PCI_MATCH_ANY;