Commit ad07d546 authored by Domen Puncer's avatar Domen Puncer Committed by David S. Miller

[NET]: In dev_seq_printf_stats(), kill extra comparison, make more readable.

parent 4bff9a25
...@@ -1940,9 +1940,9 @@ void dev_seq_stop(struct seq_file *seq, void *v) ...@@ -1940,9 +1940,9 @@ void dev_seq_stop(struct seq_file *seq, void *v)
static void dev_seq_printf_stats(struct seq_file *seq, struct net_device *dev) static void dev_seq_printf_stats(struct seq_file *seq, struct net_device *dev)
{ {
struct net_device_stats *stats = dev->get_stats ? dev->get_stats(dev) : if (dev->get_stats) {
NULL; struct net_device_stats *stats = dev->get_stats(dev);
if (stats)
seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu " seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
"%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n", "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
dev->name, stats->rx_bytes, stats->rx_packets, dev->name, stats->rx_bytes, stats->rx_packets,
...@@ -1960,7 +1960,7 @@ static void dev_seq_printf_stats(struct seq_file *seq, struct net_device *dev) ...@@ -1960,7 +1960,7 @@ static void dev_seq_printf_stats(struct seq_file *seq, struct net_device *dev)
stats->tx_window_errors + stats->tx_window_errors +
stats->tx_heartbeat_errors, stats->tx_heartbeat_errors,
stats->tx_compressed); stats->tx_compressed);
else } else
seq_printf(seq, "%6s: No statistics available.\n", dev->name); seq_printf(seq, "%6s: No statistics available.\n", dev->name);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment