diff options
author | Ola Liljedahl <ola.liljedahl@arm.com> | 2017-09-19 16:09:08 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-12-27 21:58:43 +0300 |
commit | 35f6dbf2eb39ffb8c497983566925d642c23079a (patch) | |
tree | e13d689d3669974e10be74a38825fc1febffc7eb | |
parent | 0c65d440d34974b7bde20d7d7bbca2c9ef9c98ae (diff) |
linux-generic: pktio: fix gcc7 build error in sched_cb_pktin_poll_one
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.
https://bugs.linaro.org/show_bug.cgi?id=3246
Signed-off-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r-- | platform/linux-generic/odp_packet_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 27da9b3a1..ffbc73b26 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -701,12 +701,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); } |