lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 18 Apr 2012 03:28:04 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	ordex@...istici.org
Cc:	netdev@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH 10/11] batman-adv: print OGM seq numbers
 as unsigned long

From: Antonio Quartulli <ordex@...istici.org>
Date: Wed, 18 Apr 2012 09:01:35 +0200

> On Wed, Apr 18, 2012 at 08:47:00AM +0200, Antonio Quartulli wrote:
>> On Tue, Apr 17, 2012 at 10:47:46 -0400, David Miller wrote:
>> > From: Antonio Quartulli <ordex@...istici.org>
>> > Date: Tue, 17 Apr 2012 13:58:26 +0200
>> > 
>> > > OGM sequence numbers are declared as uint32_t and so they have to printed
>> > > using %u instead of %d in order to avoid wrong representations.
>> > > 
>> > > Signed-off-by: Antonio Quartulli <ordex@...istici.org>
>> > 
>> > Fix this commit message subject, "%u" is "unsigned int" not
>> > "unsigned long"
>> > 
>> > "unsigned long" would be "%lu"
> 
> There is a problem here. On my machine (x86_64) I have:
> 
> typedef unsigned int __u32;
> typedef         __u32           uint32_t;
> 
> 
> So I should use %u to print my uint32_t variable (as I reported in my commit
> message).
> 
> Probably this is not the case on each and every architecture?
> If so, how could I handle it?

The problem is not the patch, it's your commit message
you say "print ... as unsigned long", you're not printing
it as unsigned long, you're printing it as unsigned int.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ