Date: Fri, 19 Feb 2016 16:43:03 +0000 (UTC) From: Stefan Esser <se@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295813 - head/sys/dev/pci Message-ID: <201602191643.u1JGh3S5058000@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: se Date: Fri Feb 19 16:43:03 2016 New Revision: 295813 URL: https://svnweb.freebsd.org/changeset/base/295813 Log: 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 Modified: head/sys/dev/pci/pci_user.c Modified: head/sys/dev/pci/pci_user.c ============================================================================== --- head/sys/dev/pci/pci_user.c Fri Feb 19 16:37:06 2016 (r295812) +++ head/sys/dev/pci/pci_user.c Fri Feb 19 16:43:03 2016 (r295813) @@ -709,9 +709,9 @@ pci_ioctl(struct cdev *dev, u_long cmd, * 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602191643.u1JGh3S5058000>