diff mbox series

[v1,2/7] linux-gen: pktio: ipc fix error check

Message ID 1499205607-30786-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v1,1/7] linux-gen: pktio: ipc fix send return code on tx | expand

Commit Message

Github ODP bot July 4, 2017, 10 p.m. UTC
From: Maxim Uvarov <maxim.uvarov@linaro.org>


Code clean up, break before entering to for loop.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 67 (muvarov:master_ipc_fixes)
 ** https://github.com/Linaro/odp/pull/67
 ** Patch: https://github.com/Linaro/odp/pull/67.patch
 ** Base sha: ceeab69f3af67701adb524c7b9757d19cefb1110
 ** Merge commit sha: 6f88e14c89b861d66bb7043b22f9b299b1f73ddf
 **/
 platform/linux-generic/pktio/ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c
index 1a2a37f2..7a054962 100644
--- a/platform/linux-generic/pktio/ipc.c
+++ b/platform/linux-generic/pktio/ipc.c
@@ -401,7 +401,7 @@  static void _ipc_free_ring_packets(pktio_entry_t *pktio_entry, _ring_t *r)
 	while (1) {
 		ret = _ring_mc_dequeue_burst(r, rbuf_p,
 					     PKTIO_IPC_ENTRIES);
-		if (0 == ret)
+		if (ret <= 0)
 			break;
 		for (i = 0; i < ret; i++) {
 			odp_packet_hdr_t *phdr;