Skip to contentSkip to conversation

Any reason why %4.4x and not %04x?

DISCUSSION Denis Vlasenko 1 participant 1 message Aug 25, 2005

lore
Share & tools
lore
#0 lore raw

Hi folks,

We have ~2k of printf format specs like this:

"%s: Transmit timed out, status %4.4x, PHY status %4.4x, resetting...\n"

IIRC %04x and %4.4x is totally equivalent. I even tested that (test program is not here at the moment).

I have patches to save that 2k, if anybody knows about any subtle differences between %04x and %4.4x please speak up. --
vda