dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/net/rxrpc
Julien Brunel 34093d055e net/rxrpc: Use an IS_ERR test rather than a NULL test
In case of error, the function rxrpc_get_transport returns an ERR
pointer, but never returns a NULL pointer. So after a call to this
function, a NULL test should be replaced by an IS_ERR test.

A simplified version of the semantic patch that makes this change is
as follows: 
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@correct_null_test@
expression x,E;
statement S1, S2;
@@
x =  rxrpc_get_transport(...)
<... when != x = E
if (
(
- x@p2 != NULL
+ ! IS_ERR ( x )
|
- x@p2 == NULL
+ IS_ERR( x )
)
 )
S1
else S2
...>
? x = E;
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-13 02:40:48 -07:00
..
Kconfig
Makefile
af_rxrpc.c net: convert BUG_TRAP to generic WARN_ON 2008-07-25 21:43:18 -07:00
ar-accept.c net/rxrpc: Use an IS_ERR test rather than a NULL test 2008-08-13 02:40:48 -07:00
ar-ack.c
ar-call.c
ar-connection.c
ar-connevent.c
ar-error.c
ar-input.c MIB: add struct net to UDP_INC_STATS_BH 2008-07-05 21:18:48 -07:00
ar-internal.h
ar-key.c
ar-local.c
ar-output.c
ar-peer.c
ar-proc.c
ar-recvmsg.c
ar-security.c
ar-skbuff.c
ar-transport.c net: Add missing braces to multi-statement if()s 2008-05-02 16:20:10 -07:00
rxkad.c RxRPC: Fix a regression in the RXKAD security module 2008-04-24 13:46:53 -07:00