netfilter: ipset: Use MSEC_PER_SEC consistently
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
This commit is contained in:
parent
482cfc3185
commit
aaeb6e24f5
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ ip_set_timeout_set(unsigned long *timeout, u32 t)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*timeout = msecs_to_jiffies(t * 1000) + jiffies;
|
*timeout = msecs_to_jiffies(t * MSEC_PER_SEC) + jiffies;
|
||||||
if (*timeout == IPSET_ELEM_PERMANENT)
|
if (*timeout == IPSET_ELEM_PERMANENT)
|
||||||
/* Bingo! :-) */
|
/* Bingo! :-) */
|
||||||
(*timeout)--;
|
(*timeout)--;
|
||||||
|
@ -71,7 +71,7 @@ static inline u32
|
||||||
ip_set_timeout_get(unsigned long *timeout)
|
ip_set_timeout_get(unsigned long *timeout)
|
||||||
{
|
{
|
||||||
return *timeout == IPSET_ELEM_PERMANENT ? 0 :
|
return *timeout == IPSET_ELEM_PERMANENT ? 0 :
|
||||||
jiffies_to_msecs(*timeout - jiffies)/1000;
|
jiffies_to_msecs(*timeout - jiffies)/MSEC_PER_SEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|
Loading…
Add table
Reference in a new issue