]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/devinet.c
[NETFILTER]: add some consts, remove some casts
[linux-2.6-omap-h63xx.git] / net / ipv4 / devinet.c
index 354e800be18d05dad038a7f3ae84cb0c7e9228be..abf6352f990f33ff380a27f364325b4f57153b56 100644 (file)
@@ -84,7 +84,7 @@ static struct ipv4_devconf ipv4_devconf_dflt = {
 
 #define IPV4_DEVCONF_DFLT(attr) IPV4_DEVCONF(ipv4_devconf_dflt, attr)
 
-static struct nla_policy ifa_ipv4_policy[IFA_MAX+1] __read_mostly = {
+static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = {
        [IFA_LOCAL]             = { .type = NLA_U32 },
        [IFA_ADDRESS]           = { .type = NLA_U32 },
        [IFA_BROADCAST]         = { .type = NLA_U32 },
@@ -327,12 +327,8 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
                }
 
        }
-       if (destroy) {
+       if (destroy)
                inet_free_ifa(ifa1);
-
-               if (!in_dev->ifa_list)
-                       inetdev_destroy(in_dev);
-       }
 }
 
 static void inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,