diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-02-09 09:24:47 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-11 02:19:39 -0500 |
commit | e905a9edab7f4f14f9213b52234e4a346c690911 (patch) | |
tree | 9e52a5f47eec47c5685c347ff7af22290a10305b /net/ipv4/devinet.c | |
parent | 642656518b2e64fd59d9bbd15b6885cac5fe99b1 (diff) |
[NET] IPV4: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index c40203640966..ba5e7f4cd127 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -252,7 +252,7 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, | |||
252 | 252 | ||
253 | ASSERT_RTNL(); | 253 | ASSERT_RTNL(); |
254 | 254 | ||
255 | /* 1. Deleting primary ifaddr forces deletion all secondaries | 255 | /* 1. Deleting primary ifaddr forces deletion all secondaries |
256 | * unless alias promotion is set | 256 | * unless alias promotion is set |
257 | **/ | 257 | **/ |
258 | 258 | ||
@@ -260,7 +260,7 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, | |||
260 | struct in_ifaddr **ifap1 = &ifa1->ifa_next; | 260 | struct in_ifaddr **ifap1 = &ifa1->ifa_next; |
261 | 261 | ||
262 | while ((ifa = *ifap1) != NULL) { | 262 | while ((ifa = *ifap1) != NULL) { |
263 | if (!(ifa->ifa_flags & IFA_F_SECONDARY) && | 263 | if (!(ifa->ifa_flags & IFA_F_SECONDARY) && |
264 | ifa1->ifa_scope <= ifa->ifa_scope) | 264 | ifa1->ifa_scope <= ifa->ifa_scope) |
265 | last_prim = ifa; | 265 | last_prim = ifa; |
266 | 266 | ||
@@ -583,8 +583,8 @@ static __inline__ int inet_abc_len(__be32 addr) | |||
583 | { | 583 | { |
584 | int rc = -1; /* Something else, probably a multicast. */ | 584 | int rc = -1; /* Something else, probably a multicast. */ |
585 | 585 | ||
586 | if (ZERONET(addr)) | 586 | if (ZERONET(addr)) |
587 | rc = 0; | 587 | rc = 0; |
588 | else { | 588 | else { |
589 | __u32 haddr = ntohl(addr); | 589 | __u32 haddr = ntohl(addr); |
590 | 590 | ||
@@ -596,7 +596,7 @@ static __inline__ int inet_abc_len(__be32 addr) | |||
596 | rc = 24; | 596 | rc = 24; |
597 | } | 597 | } |
598 | 598 | ||
599 | return rc; | 599 | return rc; |
600 | } | 600 | } |
601 | 601 | ||
602 | 602 | ||
@@ -1020,29 +1020,29 @@ int unregister_inetaddr_notifier(struct notifier_block *nb) | |||
1020 | * alias numbering and to create unique labels if possible. | 1020 | * alias numbering and to create unique labels if possible. |
1021 | */ | 1021 | */ |
1022 | static void inetdev_changename(struct net_device *dev, struct in_device *in_dev) | 1022 | static void inetdev_changename(struct net_device *dev, struct in_device *in_dev) |
1023 | { | 1023 | { |
1024 | struct in_ifaddr *ifa; | 1024 | struct in_ifaddr *ifa; |
1025 | int named = 0; | 1025 | int named = 0; |
1026 | 1026 | ||
1027 | for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { | 1027 | for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { |
1028 | char old[IFNAMSIZ], *dot; | 1028 | char old[IFNAMSIZ], *dot; |
1029 | 1029 | ||
1030 | memcpy(old, ifa->ifa_label, IFNAMSIZ); | 1030 | memcpy(old, ifa->ifa_label, IFNAMSIZ); |
1031 | memcpy(ifa->ifa_label, dev->name, IFNAMSIZ); | 1031 | memcpy(ifa->ifa_label, dev->name, IFNAMSIZ); |
1032 | if (named++ == 0) | 1032 | if (named++ == 0) |
1033 | continue; | 1033 | continue; |
1034 | dot = strchr(ifa->ifa_label, ':'); | 1034 | dot = strchr(ifa->ifa_label, ':'); |
1035 | if (dot == NULL) { | 1035 | if (dot == NULL) { |
1036 | sprintf(old, ":%d", named); | 1036 | sprintf(old, ":%d", named); |
1037 | dot = old; | 1037 | dot = old; |
1038 | } | 1038 | } |
1039 | if (strlen(dot) + strlen(dev->name) < IFNAMSIZ) { | 1039 | if (strlen(dot) + strlen(dev->name) < IFNAMSIZ) { |
1040 | strcat(ifa->ifa_label, dot); | 1040 | strcat(ifa->ifa_label, dot); |
1041 | } else { | 1041 | } else { |
1042 | strcpy(ifa->ifa_label + (IFNAMSIZ - strlen(dot) - 1), dot); | 1042 | strcpy(ifa->ifa_label + (IFNAMSIZ - strlen(dot) - 1), dot); |
1043 | } | 1043 | } |
1044 | } | 1044 | } |
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | /* Called only under RTNL semaphore */ | 1047 | /* Called only under RTNL semaphore */ |
1048 | 1048 | ||
@@ -1539,7 +1539,7 @@ static struct devinet_sysctl_table { | |||
1539 | }, | 1539 | }, |
1540 | }, | 1540 | }, |
1541 | .devinet_conf_dir = { | 1541 | .devinet_conf_dir = { |
1542 | { | 1542 | { |
1543 | .ctl_name = NET_IPV4_CONF, | 1543 | .ctl_name = NET_IPV4_CONF, |
1544 | .procname = "conf", | 1544 | .procname = "conf", |
1545 | .mode = 0555, | 1545 | .mode = 0555, |
@@ -1581,18 +1581,18 @@ static void devinet_sysctl_register(struct in_device *in_dev, | |||
1581 | } | 1581 | } |
1582 | 1582 | ||
1583 | if (dev) { | 1583 | if (dev) { |
1584 | dev_name = dev->name; | 1584 | dev_name = dev->name; |
1585 | t->devinet_dev[0].ctl_name = dev->ifindex; | 1585 | t->devinet_dev[0].ctl_name = dev->ifindex; |
1586 | } else { | 1586 | } else { |
1587 | dev_name = "default"; | 1587 | dev_name = "default"; |
1588 | t->devinet_dev[0].ctl_name = NET_PROTO_CONF_DEFAULT; | 1588 | t->devinet_dev[0].ctl_name = NET_PROTO_CONF_DEFAULT; |
1589 | } | 1589 | } |
1590 | 1590 | ||
1591 | /* | 1591 | /* |
1592 | * Make a copy of dev_name, because '.procname' is regarded as const | 1592 | * Make a copy of dev_name, because '.procname' is regarded as const |
1593 | * by sysctl and we wouldn't want anyone to change it under our feet | 1593 | * by sysctl and we wouldn't want anyone to change it under our feet |
1594 | * (see SIOCSIFNAME). | 1594 | * (see SIOCSIFNAME). |
1595 | */ | 1595 | */ |
1596 | dev_name = kstrdup(dev_name, GFP_KERNEL); | 1596 | dev_name = kstrdup(dev_name, GFP_KERNEL); |
1597 | if (!dev_name) | 1597 | if (!dev_name) |
1598 | goto free; | 1598 | goto free; |