aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-accept.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-02-17 21:42:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-17 21:42:03 -0500
commit163e3cb7daa8c3a6dde6a13a3d09a198930c6822 (patch)
tree67b22efc3a5e4ce904f0cc194b7dda92588b2cdd /net/rxrpc/ar-accept.c
parent9ff566074689e3aed1488780b97714ec43ba361d (diff)
net/rxrpc: Use BUG_ON
if (...) BUG(); should be replaced with BUG_ON(...) when the test has no side-effects to allow a definition of BUG_ON that drops the code completely. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @ disable unlikely @ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (unlikely(E)) { BUG(); } + BUG_ON(E); ) @@ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/ar-accept.c')
-rw-r--r--net/rxrpc/ar-accept.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rxrpc/ar-accept.c b/net/rxrpc/ar-accept.c
index 92a87fde8bfe..bdfb77417794 100644
--- a/net/rxrpc/ar-accept.c
+++ b/net/rxrpc/ar-accept.c
@@ -156,8 +156,7 @@ static int rxrpc_accept_incoming_call(struct rxrpc_local *local,
156 false); 156 false);
157 spin_unlock(&call->lock); 157 spin_unlock(&call->lock);
158 notification = NULL; 158 notification = NULL;
159 if (ret < 0) 159 BUG_ON(ret < 0);
160 BUG();
161 } 160 }
162 spin_unlock(&call->conn->state_lock); 161 spin_unlock(&call->conn->state_lock);
163 162