All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Odd use of %14pM in net/batman-adv/distributed-arp-table.c
@ 2017-06-13 21:51 ` Joe Perches
  0 siblings, 0 replies; 14+ messages in thread
From: Joe Perches @ 2017-06-13 21:51 UTC (permalink / raw)
  To: Marek Lindner, Simon Wunderlich, Antonio Quartulli
  Cc: David S. Miller, b.a.t.m.a.n, netdev, linux-kernel

An output mac address is 17 bytes

         1
12345678901234567
00:11:22:33:44:55

but in net/batman-adv/distributed-arp-table.c

int batadv_dat_cache_seq_print_text(struct seq_file *seq, void *offset)
{
[...]
			seq_printf(seq, " * %15pI4 %14pM %4i %6i:%02i\n",
				   &dat_entry->ip, dat_entry->mac_addr,
				   batadv_print_vid(dat_entry->vid),
				   last_seen_mins, last_seen_secs);

%14pM is odd as this should not emit the last byte of the
mac address.  So given the example above, it would output
00:11:22:33:44

Is that what's really desired?

If so, I'd suggest using something more obvious like %5phC


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-06-14 19:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 21:51 [B.A.T.M.A.N.] Odd use of %14pM in net/batman-adv/distributed-arp-table.c Joe Perches
2017-06-13 21:51 ` Joe Perches
2017-06-13 21:51 ` Joe Perches
2017-06-14  8:23 ` [B.A.T.M.A.N.] " Sven Eckelmann
2017-06-14  9:32   ` Joe Perches
2017-06-14  9:32     ` Joe Perches
2017-06-14  9:33   ` [B.A.T.M.A.N.] [PATCH] batman-adv: Remove unnecessary length qualifier in %14pM Joe Perches
2017-06-14  9:33     ` Joe Perches
2017-06-14  9:33     ` Joe Perches
2017-06-14 19:20     ` [B.A.T.M.A.N.] " David Miller
2017-06-14 19:20       ` David Miller
2017-06-14 19:41     ` [B.A.T.M.A.N.] " Sven Eckelmann
2017-06-14 19:41       ` Sven Eckelmann
2017-06-14 19:41       ` Sven Eckelmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.