diff options
author | Julia Lawall <julia.lawall@lip6.fr> | 2016-11-11 13:32:38 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-13 22:26:13 +0100 |
commit | eb1a6bdc28268afa964e4c9f3399961dff9fd691 (patch) | |
tree | 65f4441a51bb69fa64b659bfe64a3d53c066a2bd /net/openvswitch | |
parent | netfilter: conntrack: remove unused netns_ct member (diff) | |
download | linux-eb1a6bdc28268afa964e4c9f3399961dff9fd691.tar.xz linux-eb1a6bdc28268afa964e4c9f3399961dff9fd691.zip |
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/openvswitch')
0 files changed, 0 insertions, 0 deletions