summaryrefslogtreecommitdiff
path: root/net/batman-adv/bat_v.c
diff options
context:
space:
mode:
authorAntonio Quartulli <a@unstable.cc>2016-03-12 12:30:18 +0300
committerAntonio Quartulli <a@unstable.cc>2016-05-03 21:22:03 +0300
commit925a6f379036c58cd62a1492f83263ebe021a49d (patch)
tree043aa18ef5731c4add7b2ef6b1d6c0b7e240e4da /net/batman-adv/bat_v.c
parent565489df244626c7c1a07a5e093d7f2b20b550cc (diff)
downloadlinux-925a6f379036c58cd62a1492f83263ebe021a49d.tar.xz
batman-adv: use static string for table headers
Use a static string when showing table headers rather then a nonsense parametric one with fixed arguments. It is easier to grep and it does not need to be recomputed at runtime each time. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Antonio Quartulli <a@unstable.cc> [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/bat_v.c')
-rw-r--r--net/batman-adv/bat_v.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
index 3315b9a598af..246f9e959849 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -151,8 +151,8 @@ static void batadv_v_neigh_print(struct batadv_priv *bat_priv,
struct batadv_hard_iface *hard_iface;
int batman_count = 0;
- seq_printf(seq, " %-15s %s (%11s) [%10s]\n", "Neighbor",
- "last-seen", "throughput", "IF");
+ seq_puts(seq,
+ " Neighbor last-seen ( throughput) [ IF]\n");
rcu_read_lock();
list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
@@ -191,9 +191,8 @@ static void batadv_v_orig_print(struct batadv_priv *bat_priv,
int batman_count = 0;
u32 i;
- seq_printf(seq, " %-15s %s (%11s) %17s [%10s]: %20s ...\n",
- "Originator", "last-seen", "throughput", "Nexthop",
- "outgoingIF", "Potential nexthops");
+ seq_puts(seq,
+ " Originator last-seen ( throughput) Nexthop [outgoingIF]: Potential nexthops ...\n");
for (i = 0; i < hash->size; i++) {
head = &hash->table[i];