const void *data)
{
struct rte_dpaa2_device *dev;
- bool start_found = !start;
TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) {
- if (!start_found) {
- if (&dev->device == start)
- start_found = 1;
+ if (start && &dev->device == start)
+ start = NULL; /* starting point found */
continue;
}
const void *data)
{
struct rte_bus *bus = NULL;
- bool start_found = !start;
TAILQ_FOREACH(bus, &rte_bus_list, next) {
- if (!start_found) {
- if (bus == start)
- start_found = 1;
+ if (start && bus == start) {
+ start = NULL; /* starting point found */
continue;
}
if (cmp(bus, data) == 0)
const void *data)
{
struct rte_pci_device *dev;
- bool start_found = !start;
FOREACH_DEVICE_ON_PCIBUS(dev) {
- if (!start_found) {
- if (&dev->device == start)
- start_found = 1;
+ if (start && &dev->device == start) {
+ start = NULL; /* starting point found */
continue;
}
if (cmp(&dev->device, data) == 0)
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)