Fix variable overwrite bug in pktin_recv_buf(). Signed-off-by: Matias Elo <matias....@nokia.com> --- platform/linux-generic/odp_packet_io.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 6de39b6..416a361 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -540,12 +540,12 @@ static inline int pktin_recv_buf(odp_pktin_queue_t queue, odp_buffer_hdr_t *buf_hdr; odp_buffer_t buf; int i; - int ret; + int pkts; int num_rx = 0; - ret = odp_pktin_recv(queue, packets, num); + pkts = odp_pktin_recv(queue, packets, num); - for (i = 0; i < ret; i++) { + for (i = 0; i < pkts; i++) { pkt = packets[i]; pkt_hdr = odp_packet_hdr(pkt); buf = _odp_packet_to_buffer(pkt); @@ -553,6 +553,7 @@ static inline int pktin_recv_buf(odp_pktin_queue_t queue, if (pkt_hdr->input_flags.dst_queue) { queue_entry_t *dst_queue; + int ret; dst_queue = queue_to_qentry(pkt_hdr->dst_queue); ret = queue_enq(dst_queue, buf_hdr, 0); -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp