summaryrefslogtreecommitdiff
path: root/examples/ipv4_multicast
diff options
context:
space:
mode:
authorHuawei Xie <huawei.xie@intel.com>2016-01-27 21:58:30 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-02-10 15:47:50 +0100
commit693f715da45c48ec1ec0fe4ba2f3b5ffd11ba53e (patch)
treeec6efdef6c7d9ac9d6d1813d2d184032385d6b9c /examples/ipv4_multicast
parent6e7caa1ad9d597fed0a49468af25ae6e68b8c443 (diff)
downloaddpdk-693f715da45c48ec1ec0fe4ba2f3b5ffd11ba53e.zip
dpdk-693f715da45c48ec1ec0fe4ba2f3b5ffd11ba53e.tar.gz
dpdk-693f715da45c48ec1ec0fe4ba2f3b5ffd11ba53e.tar.xz
remove extra parentheses in return statement
fix the error reported by checkpatch: "ERROR: return is not a function, parentheses are not required" remove parentheses in return like: "return (logical expressions)" remove parentheses in return a function like: "return (rte_mempool_lookup(...))" Fixes: 6307b909b8e0 ("lib: remove extra parenthesis after return") Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Diffstat (limited to 'examples/ipv4_multicast')
-rw-r--r--examples/ipv4_multicast/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index d4253c0..5dbea1a 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -225,7 +225,7 @@ bitcnt(uint32_t v)
for (n = 0; v != 0; v &= v - 1, n++)
;
- return (n);
+ return n;
}
/**
@@ -278,13 +278,13 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
/* Create new mbuf for the header. */
if (unlikely ((hdr = rte_pktmbuf_alloc(header_pool)) == NULL))
- return (NULL);
+ return NULL;
/* If requested, then make a new clone packet. */
if (use_clone != 0 &&
unlikely ((pkt = rte_pktmbuf_clone(pkt, clone_pool)) == NULL)) {
rte_pktmbuf_free(hdr);
- return (NULL);
+ return NULL;
}
/* prepend new header */
@@ -305,7 +305,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
hdr->ol_flags = pkt->ol_flags;
__rte_mbuf_sanity_check(hdr, 1);
- return (hdr);
+ return hdr;
}
/*
@@ -509,7 +509,7 @@ parse_portmask(const char *portmask)
if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
return 0;
- return ((uint32_t)pm);
+ return (uint32_t)pm;
}
static int
@@ -523,9 +523,9 @@ parse_nqueue(const char *q_arg)
n = strtoul(q_arg, &end, 0);
if (errno != 0 || end == NULL || *end != '\0' ||
n == 0 || n >= MAX_RX_QUEUE_PER_LCORE)
- return (-1);
+ return -1;
- return (n);
+ return n;
}
/* Parse the argument given in the command line of the application */