diff mbox series

[API-NEXT,v1,1/1] linux-generic: fix GCC7 build error in sched_cb_pktin_poll_one

Message ID 1505836816-15468-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/1] linux-generic: fix GCC7 build error in sched_cb_pktin_poll_one | expand

Commit Message

Github ODP bot Sept. 19, 2017, 4 p.m. UTC
From: Ola Liljedahl <ola.liljedahl@arm.com>


Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=3246 by
adding missing curly braces around if-clause.

For builds which don't flag this as an error, the resulting
build would be functional but with degraded performance.

Signed-off-by: Ola Liljedahl <ola.liljedahl@arm.com>

Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>


Change-Id: Ia94d6f3a0528f57e0dbca528cea40cb1812f6a8d
---
/** Email created from pull request 182 (WonderfulVoid:api-next)
 ** https://github.com/Linaro/odp/pull/182
 ** Patch: https://github.com/Linaro/odp/pull/182.patch
 ** Base sha: e344e4364f771f32b86d822d0c447770588fe65d
 ** Merge commit sha: 4da50ba5dcced1e50a032d61d21617b7e5095a6e
 **/
 platform/linux-generic/odp_packet_io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index bf792a340..64ec1f670 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -702,12 +702,13 @@  int sched_cb_pktin_poll_one(int pktio_index,
 		if (odp_unlikely(pkt_hdr->p.input_flags.dst_queue)) {
 			queue = pkt_hdr->dst_queue;
 			buf_hdr = packet_to_buf_hdr(pkt);
-			if (queue_fn->enq_multi(queue, &buf_hdr, 1) < 0)
+			if (queue_fn->enq_multi(queue, &buf_hdr, 1) < 0) {
 				/* Queue full? */
 				odp_packet_free(pkt);
 				__atomic_fetch_add(&entry->s.stats.in_discards,
 						   1,
 						   __ATOMIC_RELAXED);
+			}
 		} else {
 			evt_tbl[num_rx++] = odp_packet_to_event(pkt);
 		}