Re: [B.A.T.M.A.N.] [PATCH 10/11] batman-adv: print OGM seq numbers as unsigned long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@xxxxxxxxxxxxx>
> > 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@xxxxxxxxxxxxx>
> > 
> > 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

Probably this is not the case on each and every architecture?
If so, how could I handle it?


Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

Attachment: pgpHoAYqi8_DN.pgp
Description: PGP signature

[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux