summaryrefslogtreecommitdiff
path: root/net/decnet
diff options
context:
space:
mode:
authorJulia Lawall <julia.lawall@lip6.fr>2016-11-11 13:32:38 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-11-13 22:26:13 +0100
commiteb1a6bdc28268afa964e4c9f3399961dff9fd691 (patch)
tree65f4441a51bb69fa64b659bfe64a3d53c066a2bd /net/decnet
parent7e416ad7416307e22871a0ef0f0f14e2bb66a0d1 (diff)
netfilter: x_tables: simplify IS_ERR_OR_NULL to NULL test
Since commit 7926dbfa4bc1 ("netfilter: don't use mutex_lock_interruptible()"), the function xt_find_table_lock can only return NULL on an error. Simplify the call sites and update the comment before the function. The semantic patch that change the code is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression t,e; @@ t = \(xt_find_table_lock(...)\| try_then_request_module(xt_find_table_lock(...),...)\) ... when != t=e - ! IS_ERR_OR_NULL(t) + t @@ expression t,e; @@ t = \(xt_find_table_lock(...)\| try_then_request_module(xt_find_table_lock(...),...)\) ... when != t=e - IS_ERR_OR_NULL(t) + !t @@ expression t,e,e1; @@ t = \(xt_find_table_lock(...)\| try_then_request_module(xt_find_table_lock(...),...)\) ... when != t=e ?- t ? PTR_ERR(t) : e1 + e1 ... when any // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/decnet')
0 files changed, 0 insertions, 0 deletions