]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net: ipv6: minor: *_start_timer: rather use unsigned long
authorDaniel Borkmann <dborkman@redhat.com>
Tue, 20 Aug 2013 10:22:01 +0000 (12:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Aug 2013 06:52:02 +0000 (23:52 -0700)
For the functions mld_gq_start_timer(), mld_ifc_start_timer(),
and mld_dad_start_timer(), rather use unsigned long than int
as we operate only on unsigned values anyway. This seems more
appropriate as there is no good reason to do type conversions
to int, that could lead to future errors.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/mcast.c

index 57863e206d561a866c91909f13212a1382e43dce..33f98d9ac37689e1f3909d30b26c84471c39451e 100644 (file)
@@ -996,24 +996,24 @@ bool ipv6_chk_mcast_addr(struct net_device *dev, const struct in6_addr *group,
 
 static void mld_gq_start_timer(struct inet6_dev *idev)
 {
-       int tv = net_random() % idev->mc_maxdelay;
+       unsigned long tv = net_random() % idev->mc_maxdelay;
 
        idev->mc_gq_running = 1;
        if (!mod_timer(&idev->mc_gq_timer, jiffies+tv+2))
                in6_dev_hold(idev);
 }
 
-static void mld_ifc_start_timer(struct inet6_dev *idev, int delay)
+static void mld_ifc_start_timer(struct inet6_dev *idev, unsigned long delay)
 {
-       int tv = net_random() % delay;
+       unsigned long tv = net_random() % delay;
 
        if (!mod_timer(&idev->mc_ifc_timer, jiffies+tv+2))
                in6_dev_hold(idev);
 }
 
-static void mld_dad_start_timer(struct inet6_dev *idev, int delay)
+static void mld_dad_start_timer(struct inet6_dev *idev, unsigned long delay)
 {
-       int tv = net_random() % delay;
+       unsigned long tv = net_random() % delay;
 
        if (!mod_timer(&idev->mc_dad_timer, jiffies+tv+2))
                in6_dev_hold(idev);