Re: [PATCH] fix gcc -W warning in netdevice.h

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

 



Jesper Juhl writes:
 > --- linux-2.6.12-rc6-mm1-orig/include/linux/netdevice.h	2005-06-12 15:58:58.000000000 +0200
 > +++ linux-2.6.12-rc6-mm1/include/linux/netdevice.h	2005-06-16 00:52:14.000000000 +0200
 > @@ -778,7 +778,7 @@ enum {
 >  static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
 >  {
 >  	/* use default */
 > -	if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
 > +	if (debug_value < 0 || debug_value >= (int)(sizeof(u32) * 8))
 >  		return default_msg_enable_bits;

I'd change debug_value to unsigned, and drop the "< 0" test and the
now redundant "(int)" cast. Both cleaner and faster. Win Win :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux