netfilter: ipset: Use MSEC_PER_SEC consistently
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Fri, 12 Jun 2015 19:07:54 +0000 (21:07 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 14 Jun 2015 08:40:12 +0000 (10:40 +0200)
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
include/linux/netfilter/ipset/ip_set_timeout.h

index 83c2f9e0886cc537f57bf1db5cbfc035fbe93596..3c8842bcedaae8eac05576749292c5b488998e7c 100644 (file)
@@ -61,7 +61,7 @@ ip_set_timeout_set(unsigned long *timeout, u32 t)
                return;
        }
 
-       *timeout = msecs_to_jiffies(t * 1000) + jiffies;
+       *timeout = msecs_to_jiffies(t * MSEC_PER_SEC) + jiffies;
        if (*timeout == IPSET_ELEM_PERMANENT)
                /* Bingo! :-) */
                (*timeout)--;
@@ -71,7 +71,7 @@ static inline u32
 ip_set_timeout_get(unsigned long *timeout)
 {
        return *timeout == IPSET_ELEM_PERMANENT ? 0 :
-               jiffies_to_msecs(*timeout - jiffies)/1000;
+               jiffies_to_msecs(*timeout - jiffies)/MSEC_PER_SEC;
 }
 
 #endif /* __KERNEL__ */