summaryrefslogtreecommitdiff
path: root/include/linux/netfilter/ipset
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2015-06-12 21:07:54 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2015-06-14 10:40:12 +0200
commitaaeb6e24f5b6cb6a664fbdec6e08b65c3173c1b3 (patch)
treedb6dc6d09d5e2e8937fa24f1cec74c63be5ca1a6 /include/linux/netfilter/ipset
parent482cfc318559e2527dfd8513582d2fdb276e47c2 (diff)
netfilter: ipset: Use MSEC_PER_SEC consistently
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'include/linux/netfilter/ipset')
-rw-r--r--include/linux/netfilter/ipset/ip_set_timeout.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netfilter/ipset/ip_set_timeout.h b/include/linux/netfilter/ipset/ip_set_timeout.h
index 83c2f9e0886c..3c8842bcedaa 100644
--- a/include/linux/netfilter/ipset/ip_set_timeout.h
+++ b/include/linux/netfilter/ipset/ip_set_timeout.h
@@ -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__ */