lkml.org 
[lkml]   [1998]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Re: [ipchains] logging tcp/udp port numbers
Date
In message <Pine.LNX.3.95.981119094519.2684A-100000@penguin.transmeta.com> you 
write:
>
>
> On Thu, 19 Nov 1998, Paul Rusty Russell wrote:
> >
> > Reread patch; I'm not dropping it. Ignoring the `h' qualifier is the
> > right thing to do except in the already-broken case of an actual int,
> > eg:
> >
> > printk("%hu", 65536);
>
> It's _never_ the right thing to do. It gets the sign wrong, for example,
> and it shows undefined bits that aren't supposed to be showed. You have to
> at least cast the argument correctly.

Huh? I'm saying that printk() can happily ignore the `h' modifier.
glibc does this for `%hi' (although not for `%hu' - go figure).

I can't even figure out what you think I said, but I'm happy it's
fixed. *And* I learnt another obscure C rule in the process.

What more can one ask for?

Rusty.
PS. We're now off-topic: any more mail straight to me thanks.
--
.sig lost in the mail.

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.082 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site