From: Honnappa Nagarahalli Date: Sun, 25 Oct 2020 05:45:55 +0000 (-0500) Subject: test/ring: remove unnecessary braces X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=31354c762cafed5959359db8078e4f44cbf0565c;p=dpdk.git test/ring: remove unnecessary braces Remove unnecessary braces to improve readability. Signed-off-by: Honnappa Nagarahalli Acked-by: Konstantin Ananyev --- diff --git a/app/test/test_ring.c b/app/test/test_ring.c index a62cb263b8..2913e41476 100644 --- a/app/test/test_ring.c +++ b/app/test/test_ring.c @@ -247,7 +247,7 @@ static void** test_ring_inc_ptr(void **obj, int esize, unsigned int n) { /* Legacy queue APIs? */ - if ((esize) == -1) + if (esize == -1) return ((void **)obj) + n; else return (void **)(((uint32_t *)obj) + diff --git a/app/test/test_ring.h b/app/test/test_ring.h index d4b15af7c2..2785559b3f 100644 --- a/app/test/test_ring.h +++ b/app/test/test_ring.h @@ -35,11 +35,11 @@ test_ring_create(const char *name, int esize, unsigned int count, int socket_id, unsigned int flags) { /* Legacy queue APIs? */ - if ((esize) == -1) - return rte_ring_create((name), (count), (socket_id), (flags)); + if (esize == -1) + return rte_ring_create(name, count, socket_id, flags); else - return rte_ring_create_elem((name), (esize), (count), - (socket_id), (flags)); + return rte_ring_create_elem(name, esize, count, + socket_id, flags); } static __rte_always_inline unsigned int @@ -47,7 +47,7 @@ test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n, unsigned int api_type) { /* Legacy queue APIs? */ - if ((esize) == -1) + if (esize == -1) switch (api_type) { case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE): return rte_ring_enqueue(r, *obj); @@ -108,7 +108,7 @@ test_ring_dequeue(struct rte_ring *r, void **obj, int esize, unsigned int n, unsigned int api_type) { /* Legacy queue APIs? */ - if ((esize) == -1) + if (esize == -1) switch (api_type) { case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE): return rte_ring_dequeue(r, obj);