Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752120AbdFNJdW (ORCPT ); Wed, 14 Jun 2017 05:33:22 -0400 Received: from smtprelay0222.hostedemail.com ([216.40.44.222]:45720 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751780AbdFNJcU (ORCPT ); Wed, 14 Jun 2017 05:32:20 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 48,2.914,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:418:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:4321:5007:10004:10400:10848:11232:11658:11914:12043:12114:12296:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21433:21627:30003:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: humor71_6b5958071965b X-Filterd-Recvd-Size: 1624 Message-ID: <1497432736.18751.39.camel@perches.com> Subject: Re: [B.A.T.M.A.N.] Odd use of %14pM in net/batman-adv/distributed-arp-table.c From: Joe Perches To: Sven Eckelmann , b.a.t.m.a.n@lists.open-mesh.org Cc: Marek Lindner , Simon Wunderlich , Antonio Quartulli , netdev@vger.kernel.org, "David S. Miller" , linux-kernel@vger.kernel.org Date: Wed, 14 Jun 2017 02:32:16 -0700 In-Reply-To: <5300874.nPgxNW8UST@bentobox> References: <1497390701.18751.26.camel@perches.com> <5300874.nPgxNW8UST@bentobox> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 626 Lines: 23 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.