lkml.org 
[lkml]   [2004]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2.6.2] drivers/net/bonding/bond_alb.c
Date
From

__constant_htons is used on a variable that is only a byte. This results
in an if statement always returning true in function bond_alb_xmit.

This is the compiler warning on gcc 3.3.2 a gentoo linux system:
CC [M] drivers/net/bonding/bond_alb.o
drivers/net/bonding/bond_alb.c: In function `bond_alb_xmit':
drivers/net/bonding/bond_alb.c:1340: warning: comparison is always true due to limited range of data type

Here is the patch:
--- linux-2.6.2/drivers/net/bonding/bond_alb.c.orig 2004-02-04 15:08:04.228336168 -0800
+++ linux-2.6.2/drivers/net/bonding/bond_alb.c 2004-02-04 15:26:03.769221008 -0800
@@ -1336,8 +1336,7 @@ bond_alb_xmit(struct sk_buff *skb, struc
break;
}

- if (ipx_hdr(skb)->ipx_type !=
- __constant_htons(IPX_TYPE_NCP)) {
+ if (ipx_hdr(skb)->ipx_type != IPX_TYPE_NCP) {
/* The only protocol worth balancing in
* this family since it has an "ARP" like
* mechanism

--
Bryan Whitehead
driver@megahappy.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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