X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Feal_common_vdev.c;h=9ec62f4d4deab06b66df9241046f25337b32859b;hb=c7fe1eea8a74dbe756596d9e798662f0b2c48885;hp=baf3c5bfa23ff65705dfb4877a4d5ccab7fcbcfc;hpb=61d04efc3825b5059ded38c3f23e8e8aaf4db943;p=dpdk.git diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index baf3c5bfa2..9ec62f4d4d 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -342,12 +342,10 @@ vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp, const void *data) { struct rte_vdev_device *dev; - bool start_found = !start; TAILQ_FOREACH(dev, &vdev_device_list, next) { - if (start_found == 0) { - if (&dev->device == start) - start_found = 1; + if (start && &dev->device == start) { + start = NULL; continue; } if (cmp(&dev->device, data) == 0)