Skip to contentSkip to conversation

convert __constant_htons(constant) to htons

BRIDGE Arnaldo Carvalho de Melo 1 participant 1 message Oct 2, 2004

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi David,

Please consider pulling from:

bk://kernel.bkbits.net/acme/sk_buff-2.6

Now there are two outstanding changesets in this tree.

Regards,

- Arnaldo

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================

[email protected], 2004-10-02 16:27:19-03:00, [email protected]
[BRIDGE] convert __constant_htons(constant) to htons

 ebt_arp.c      |    4 ++--
 ebt_arpreply.c |    6 +++---
 ebt_ip.c       |    2 +-
 ebt_log.c      |    2 +-
 ebt_vlan.c     |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)
net/bridge/netfilter/ebt_arp.c +2 -2
diff -Nru a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c
@@ -108,8 +108,8 @@
 
 	if (datalen != EBT_ALIGN(sizeof(struct ebt_arp_info)))
 		return -EINVAL;
-	if ((e->ethproto != __constant_htons(ETH_P_ARP) &&
-	   e->ethproto != __constant_htons(ETH_P_RARP)) ||
+	if ((e->ethproto != htons(ETH_P_ARP) &&
+	   e->ethproto != htons(ETH_P_RARP)) ||
 	   e->invflags & EBT_IPROTO)
 		return -EINVAL;
 	if (info->bitmask & ~EBT_ARP_MASK || info->invflags & ~EBT_ARP_MASK)
net/bridge/netfilter/ebt_arpreply.c +3 -3
diff -Nru a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
@@ -29,9 +29,9 @@
 	if (ap == NULL)
 		return EBT_DROP;
 
-	if (ap->ar_op != __constant_htons(ARPOP_REQUEST) ||
+	if (ap->ar_op != htons(ARPOP_REQUEST) ||
 	    ap->ar_hln != ETH_ALEN ||
-	    ap->ar_pro != __constant_htons(ETH_P_IP) ||
+	    ap->ar_pro != htons(ETH_P_IP) ||
 	    ap->ar_pln != 4)
 		return EBT_CONTINUE;
 
@@ -65,7 +65,7 @@
 		return -EINVAL;
 	if (BASE_CHAIN && info->target == EBT_RETURN)
 		return -EINVAL;
-	if (e->ethproto != __constant_htons(ETH_P_ARP) ||
+	if (e->ethproto != htons(ETH_P_ARP) ||
 	    e->invflags & EBT_IPROTO)
 		return -EINVAL;
 	CLEAR_BASE_CHAIN_BIT;
net/bridge/netfilter/ebt_ip.c +1 -1
diff -Nru a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
@@ -80,7 +80,7 @@
 
 	if (datalen != EBT_ALIGN(sizeof(struct ebt_ip_info)))
 		return -EINVAL;
-	if (e->ethproto != __constant_htons(ETH_P_IP) ||
+	if (e->ethproto != htons(ETH_P_IP) ||
 	   e->invflags & EBT_IPROTO)
 		return -EINVAL;
 	if (info->bitmask & ~EBT_IP_MASK || info->invflags & ~EBT_IP_MASK)
net/bridge/netfilter/ebt_log.c +1 -1
diff -Nru a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
@@ -121,7 +121,7 @@
 
 		/* If it's for Ethernet and the lengths are OK,
 		 * then log the ARP payload */
-		if (ah->ar_hrd == __constant_htons(1) &&
+		if (ah->ar_hrd == htons(1) &&
 		    ah->ar_hln == ETH_ALEN &&
 		    ah->ar_pln == sizeof(uint32_t)) {
 			struct arppayload _arpp, *ap;
net/bridge/netfilter/ebt_vlan.c +1 -1
diff -Nru a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c
@@ -104,7 +104,7 @@
 	}
 
 	/* Is it 802.1Q frame checked? */
-	if (e->ethproto != __constant_htons(ETH_P_8021Q)) {
+	if (e->ethproto != htons(ETH_P_8021Q)) {
 		DEBUG_MSG
 		    ("passed entry proto %2.4X is not 802.1Q (8100)\n",
 		     (unsigned short) ntohs(e->ethproto));

===================================================================

This BitKeeper patch contains the following changesets:
1.2031
## Wrapped with gzip_uu ##

M'XL( 'T!7T$ ^U876_;-A1]MGX%AP)%BD$ROT1*1ATD38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