diff options
author | se <se@FreeBSD.org> | 2016-02-19 16:43:03 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 2016-02-19 16:43:03 +0000 |
commit | 4008ad68fe52322348e4206fd111f52f0f358b97 (patch) | |
tree | b23a3fb94c8234837bb6ad2c9a363df463b38a5d | |
parent | e6b8864942931926eef37e5d00816ac85552f3c2 (diff) | |
download | FreeBSD-src-4008ad68fe52322348e4206fd111f52f0f358b97.zip FreeBSD-src-4008ad68fe52322348e4206fd111f52f0f358b97.tar.gz |
Remove redundant check for "(dinfo != NULL)", it has already been performed
as the first part of this complex loop conditional.
Found by: PVS Static Analysis
-rw-r--r-- | sys/dev/pci/pci_user.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index e69fde2..ecfa2e2 100644 --- a/sys/dev/pci/pci_user.c +++ b/sys/dev/pci/pci_user.c @@ -709,9 +709,9 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t * that match the user's criteria. */ for (cio->num_matches = 0, error = 0, i = 0, - dinfo = STAILQ_FIRST(devlist_head); - (dinfo != NULL) && (cio->num_matches < ionum) - && (error == 0) && (i < pci_numdevs) && (dinfo != NULL); + dinfo = STAILQ_FIRST(devlist_head); + (dinfo != NULL) && (cio->num_matches < ionum) && + (error == 0) && (i < pci_numdevs)); dinfo = STAILQ_NEXT(dinfo, pci_links), i++) { if (i < cio->offset) |