Moved all assignments in if conditions to the preceeding line
Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dev_kfree_skb_any(skb);
- if ((net_device_ctx->avail += num_pages) >= PACKET_PAGES_HIWATER)
+ net_device_ctx->avail += num_pages;
+ if (net_device_ctx->avail >= PACKET_PAGES_HIWATER)
netif_wake_queue(net);
}
}
net->stats.tx_packets,
net->stats.tx_bytes);
- if ((net_device_ctx->avail -= num_pages) < PACKET_PAGES_LOWATER)
+ net_device_ctx->avail -= num_pages;
+ if (net_device_ctx->avail < PACKET_PAGES_LOWATER)
netif_stop_queue(net);
} else {
/* we are shutting down or bus overloaded, just drop packet */