Re: [PATCH] Re: [ipchains] logging tcp/udp port numbers

Michael Meissner (meissner@cygnus.com)
Wed, 18 Nov 1998 19:21:12 -0500


On Wed, Nov 18, 1998 at 11:53:22AM +1130, Paul Rusty Russell wrote:
> Linus, please apply.
>
> The %h printk modifier is used in 5 source files, and doesn't work on
> ppc and sparc (vararg passing a short is broken on these platforms it
> seems).

ISO C does not allow using va_arg with short types (char, short, float), so the
ppc and sparc aren't broken, the code is wrong. Because the ppc and sparc are
both big endian machines, what you are seeing is the upper 16 bits of the
argument.

-- 
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/