[02/10] eventdev: fix possible use of uninitialized var
Checks
Commit Message
Fix the logic for the case of event queue allowing all schedule types.
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
---
lib/librte_eventdev/rte_event_timer_adapter.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
@@ -706,11 +706,11 @@ check_destination_event_queue(struct rte_event_timer *evtim,
RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE,
&sched_type);
- if ((ret < 0 && ret != -EOVERFLOW) ||
- evtim->ev.sched_type != sched_type)
- return -1;
+ if ((ret == 0 && evtim->ev.sched_type == sched_type) ||
+ ret == -EOVERFLOW)
+ return 0;
- return 0;
+ return -1;
}
static int