summaryrefslogtreecommitdiff
path: root/trafgen.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-09-12 18:38:50 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-09-12 18:40:46 +0200
commit0450fd1d25b81e12908dfdac1819a571f10a8ee7 (patch)
treec15f6b22a6efdb7e1471ece19c11bb1e81269496 /trafgen.c
parentdefd121efe1c394fe002ce9b0f36a2422a054af7 (diff)
trafgen: combine likely conditions
Combine multiple likely conditions into one. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'trafgen.c')
-rw-r--r--trafgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trafgen.c b/trafgen.c
index e140479..5150a91 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -547,7 +547,7 @@ static void xmit_slowpath_or_die(struct ctx *ctx, int cpu, unsigned long orig_nu
bug_on(gettimeofday(&start, NULL));
- while (likely(sigint == 0) && likely(num > 0) && likely(plen > 0)) {
+ while (likely(sigint == 0 && num > 0 && plen > 0)) {
pktd = &packet_dyn[i];
if (pktd->clen + pktd->rlen + pktd->slen) {
apply_counter(i);
@@ -649,7 +649,7 @@ static void xmit_fastpath_or_die(struct ctx *ctx, int cpu, unsigned long orig_nu
bug_on(gettimeofday(&start, NULL));
- while (likely(sigint == 0) && likely(num > 0) && likely(plen > 0)) {
+ while (likely(sigint == 0 && num > 0 && plen > 0)) {
while (user_may_pull_from_tx(tx_ring.frames[it].iov_base) && likely(num > 0)) {
hdr = tx_ring.frames[it].iov_base;
out = ((uint8_t *) hdr) + TPACKET2_HDRLEN - sizeof(struct sockaddr_ll);