public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public•gmane.org>
To: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public•gmane.org>,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public•gmane.org
Cc: Marek Lindner
	<mareklindner-rVWd3aGhH2z5bpWLKbzFeg@public•gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	Antonio Quartulli <a@unstable•cc>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public•gmane.org>
Subject: Re: Odd use of %14pM in net/batman-adv/distributed-arp-table.c
Date: Wed, 14 Jun 2017 02:32:16 -0700	[thread overview]
Message-ID: <1497432736.18751.39.camel@perches.com> (raw)
In-Reply-To: <5300874.nPgxNW8UST@bentobox>

On Wed, 2017-06-14 at 10:23 +0200, Sven Eckelmann wrote:
> On Dienstag, 13. Juni 2017 14:51:41 CEST Joe Perches wrote:
> > An output mac address is 17 bytes
> 
> [...]
> > but in net/batman-adv/distributed-arp-table.c
> 
> [...]
> > %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
> 
> [...]
> 
> I completely agree too the "wrong length" part. It is currently not omitting 
> the last byte:

Right, I only looked at vsprintf.c and mistook precision for
field_width.

Do you want to provide a patch to convert it to simple %pM's?

OK.

  reply	other threads:[~2017-06-14  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 21:51 Odd use of %14pM in net/batman-adv/distributed-arp-table.c Joe Perches
2017-06-14  8:23 ` [B.A.T.M.A.N.] " Sven Eckelmann
2017-06-14  9:32   ` Joe Perches [this message]
2017-06-14  9:33   ` [PATCH] batman-adv: Remove unnecessary length qualifier in %14pM Joe Perches
2017-06-14 19:20     ` David Miller
     [not found]     ` <c3693cdd478c68f078f105f55972a4406b333e69.1497432565.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-06-14 19:41       ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497432736.18751.39.camel@perches.com \
    --to=joe-6d6dil74uinbdgjk7y7tuq@public$(echo .)gmane.org \
    --cc=a@unstable$(echo .)cc \
    --cc=b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public$(echo .)gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public$(echo .)gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=mareklindner-rVWd3aGhH2z5bpWLKbzFeg@public$(echo .)gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=sven-KaDOiPu9UxWEi8DpZVb4nw@public$(echo .)gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox