diff options
author | Toomas Soome <tsoome@me.com> | 2019-01-21 20:07:11 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-06-24 21:29:02 +0300 |
commit | 5f060f5100426465bddc18c6f81b146ccee30eb8 (patch) | |
tree | 8eece8c9e0a686abd52226c1b0980a15d1819d09 | |
parent | 22ca2f96318fd461cfbcc23fd450623fe08610a3 (diff) | |
download | illumos-joyent-5f060f5100426465bddc18c6f81b146ccee30eb8.tar.gz |
11120 libpcidb: NULL pointer errors
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/lib/libpcidb/common/pcidb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/lib/libpcidb/common/pcidb.c b/usr/src/lib/libpcidb/common/pcidb.c index 2d3babec90..ec1e8526d6 100644 --- a/usr/src/lib/libpcidb/common/pcidb.c +++ b/usr/src/lib/libpcidb/common/pcidb.c @@ -90,7 +90,7 @@ struct pcidb_device { struct pcidb_vendor { uint16_t pv_id; - char pv_name[PCI_NAME_MAX]; + char pv_name[PCI_NAME_MAX]; struct pcidb_device *pv_dstart; struct pcidb_device *pv_dend; struct pcidb_vendor *pv_prev; @@ -278,7 +278,7 @@ newstate: case PDB_VENDOR: v = parse_vendor(buf, hdl); if (v == NULL) - return (NULL); + return (0); state = PDB_DEVICE; continue; case PDB_DEVICE: @@ -295,7 +295,7 @@ newstate: assert(v != NULL); d = parse_device(buf, v); if (d == NULL) - return (NULL); + return (0); continue; case PDB_SUBDEV: if (buf[0] != '\t') { |