]> mj.ucw.cz Git - pciutils.git/commitdiff
Fixed MSAN errnum use-of-uninitialized value warning. gzerror is not guaranteed to...
authorNathan Moinvaziri <nathan@nathanm.com>
Fri, 20 Nov 2020 23:14:06 +0000 (15:14 -0800)
committerNathan Moinvaziri <nathan@nathanm.com>
Fri, 20 Nov 2020 23:14:06 +0000 (15:14 -0800)
lib/names-parse.c

index f3b7da9ee1897c4bfc950c50d2de9b0777038c8b..c86f8af3462f158b9ffabadffaf2dff1bcf1481a 100644 (file)
@@ -42,7 +42,7 @@ static pci_file pci_open(struct pci_access *a)
 #define pci_close(f)           gzclose(f)
 #define PCI_ERROR(f, err)                                              \
        if (!err) {                                                     \
-               int errnum;                                             \
+               int errnum = 0;                                         \
                gzerror(f, &errnum);                                    \
                if (errnum >= 0) err = NULL;                            \
                else if (errnum == Z_ERRNO) err = "I/O error";          \