From: Al Viro <[EMAIL PROTECTED]>
Date: Sat, 7 Jan 2006 12:26:06 +0000

> OK.  Another question: do you have any objections against
> static inline void ip_eth_mc_map(__be32 addr, char *buf)
> {
>         __u32 n=ntohl(addr);
>         buf[0]=0x01;
>         buf[1]=0x00;
>         buf[2]=0x5e;
>         buf[5]=n&0xFF;
>         addr>>=8;
>         buf[4]=n&0xFF;
>         addr>>=8;
>         buf[3]=n&0x7F;
> }
> 
> That does compile to exact same code as original - gcc fortunately has
> enough clue to realize that addr is never used past the initialization of
> n, which is, from C point of view, of exact same type as addr.

Why are you shifting "addr" instead of "n"?  Are you working with
some parallel universe version of C I am unaware of? :-)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to