Skip to contentSkip to conversation

igb: misc cleanup to combine one if statement

PATCH Applied Jeff Kirsher 2 participants 2 messages Feb 14, 2009 – Feb 16, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 4/6 igb: misc cleanup to combine one if statement

From: Alexander Duyck <[email protected]>

This patch combines a pair of if statements into one.

---

 drivers/net/igb/igb_main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/igb/igb_main.c +3 -3
index 5a6bcef..6c6866b 100644
@@ -2981,9 +2981,9 @@ static int igb_xmit_frame_ring_adv(struct sk_buff *skb,
 
 	if (tso)
 		tx_flags |= IGB_TX_FLAGS_TSO;
-	else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags))
-			if (skb->ip_summed == CHECKSUM_PARTIAL)
-				tx_flags |= IGB_TX_FLAGS_CSUM;
+	else if (igb_tx_csum_adv(adapter, tx_ring, skb, tx_flags) &&
+	         (skb->ip_summed == CHECKSUM_PARTIAL))
+		tx_flags |= IGB_TX_FLAGS_CSUM;
 
 	igb_tx_queue_adv(adapter, tx_ring, tx_flags,
 			 igb_tx_map_adv(adapter, tx_ring, skb, first),