diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2016-11-10 11:24:15 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2016-11-10 13:28:41 +0100 |
commit | da9fbfa76f32a031cb70b11e9fa650e30c85d040 (patch) | |
tree | ad0ca2b293ca5680d2c71e3e7ad1c15d3eb3c79e /include/linux/netfilter/ipset/ip_set_timeout.h | |
parent | 2da16a6948ca8f025e2c226ea4fc32baa6b90f27 (diff) |
netfilter: ipset: Mark some helper args as const.
Mark some of the helpers arguments as const.
Ported from a patch proposed by Sergey Popovich <popovich_sergei@mail.ua>.
Suggested-by: Sergey Popovich <popovich_sergei@mail.ua>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'include/linux/netfilter/ipset/ip_set_timeout.h')
-rw-r--r-- | include/linux/netfilter/ipset/ip_set_timeout.h | 4 |
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 1d6a935c1ac5..bfb3531fd88a 100644 --- a/include/linux/netfilter/ipset/ip_set_timeout.h +++ b/include/linux/netfilter/ipset/ip_set_timeout.h @@ -40,7 +40,7 @@ ip_set_timeout_uget(struct nlattr *tb) } static inline bool -ip_set_timeout_expired(unsigned long *t) +ip_set_timeout_expired(const unsigned long *t) { return *t != IPSET_ELEM_PERMANENT && time_is_before_jiffies(*t); } @@ -63,7 +63,7 @@ ip_set_timeout_set(unsigned long *timeout, u32 value) } static inline u32 -ip_set_timeout_get(unsigned long *timeout) +ip_set_timeout_get(const unsigned long *timeout) { return *timeout == IPSET_ELEM_PERMANENT ? 0 : jiffies_to_msecs(*timeout - jiffies)/MSEC_PER_SEC; |