aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-14 23:51:49 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:22:50 -0500
commit714e85be3557222bc25f69c252326207c900a7db (patch)
treecb59a6d0a94245dc8575507386af1be31dd7fad9 /net/ipv4/devinet.c
parent252e33467a3b016f20dd8df12269cef3b167f21e (diff)
[IPV6]: Assorted trivial endianness annotations.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index f38cbbae0ae3..a1b356c8aa59 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -577,20 +577,20 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg
577 * Determine a default network mask, based on the IP address. 577 * Determine a default network mask, based on the IP address.
578 */ 578 */
579 579
580static __inline__ int inet_abc_len(u32 addr) 580static __inline__ int inet_abc_len(__be32 addr)
581{ 581{
582 int rc = -1; /* Something else, probably a multicast. */ 582 int rc = -1; /* Something else, probably a multicast. */
583 583
584 if (ZERONET(addr)) 584 if (ZERONET(addr))
585 rc = 0; 585 rc = 0;
586 else { 586 else {
587 addr = ntohl(addr); 587 __u32 haddr = ntohl(addr);
588 588
589 if (IN_CLASSA(addr)) 589 if (IN_CLASSA(haddr))
590 rc = 8; 590 rc = 8;
591 else if (IN_CLASSB(addr)) 591 else if (IN_CLASSB(haddr))
592 rc = 16; 592 rc = 16;
593 else if (IN_CLASSC(addr)) 593 else if (IN_CLASSC(haddr))
594 rc = 24; 594 rc = 24;
595 } 595 }
596 596