git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bus: simplify finding starting point
[dpdk.git]
/
lib
/
librte_eal
/
common
/
eal_common_vdev.c
diff --git
a/lib/librte_eal/common/eal_common_vdev.c
b/lib/librte_eal/common/eal_common_vdev.c
index
baf3c5b
..
9ec62f4
100644
(file)
--- 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;
const void *data)
{
struct rte_vdev_device *dev;
- bool start_found = !start;
TAILQ_FOREACH(dev, &vdev_device_list, next) {
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)
continue;
}
if (cmp(&dev->device, data) == 0)