@@ -307,18 +307,18 @@ odp_buffer_pool_t odp_buffer_pool_next(odp_buffer_pool_t pool_hdl,
} else {
pool_id = pool_handle_to_index(pool_hdl);
- if (pool_id == ODP_CONFIG_BUFFER_POOLS)
+ if (++pool_id == ODP_CONFIG_BUFFER_POOLS)
return ODP_BUFFER_POOL_INVALID;
else
- next_pool = get_pool_entry(++pool_id);
+ next_pool = get_pool_entry(pool_id);
}
/* Only interested in pools that exist */
while (next_pool->s.shm == ODP_SHM_INVALID) {
- if (pool_id == ODP_CONFIG_BUFFER_POOLS)
+ if (++pool_id == ODP_CONFIG_BUFFER_POOLS)
return ODP_BUFFER_POOL_INVALID;
else
- next_pool = get_pool_entry(++pool_id);
+ next_pool = get_pool_entry(pool_id);
}
/* Found the next pool, so return info about it */