1
0
Fork 0
alistair23-linux/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 [RXRPC]: Add missing select on CRYPTO 2007-11-30 23:30:40 +11:00
Makefile [AF_RXRPC]: Delete the old RxRPC code. 2007-04-26 15:55:48 -07:00
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 net/rxrpc: Use BUG_ON 2008-02-17 18:42:03 -08:00
ar-call.c [AF_RXRPC]: constify function pointer tables 2008-01-31 19:27:18 -08:00
ar-connection.c [RXRPC]: Use cpu_to_be32() where appropriate. 2008-01-28 14:58:04 -08:00
ar-connevent.c [AF_RXRPC]: Add an interface to the AF_RXRPC module for the AFS filesystem to use 2007-04-26 15:50:17 -07:00
ar-error.c [AF_RXRPC]: Sort out MTU handling. 2007-05-04 12:41:11 -07:00
ar-input.c MIB: add struct net to UDP_INC_STATS_BH 2008-07-05 21:18:48 -07:00
ar-internal.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
ar-key.c KEYS: Make request_key() and co fundamentally asynchronous 2007-10-17 08:42:57 -07:00
ar-local.c [NET]: Add the helper kernel_sock_shutdown() 2007-11-12 18:10:39 -08:00
ar-output.c [AF_RXRPC]: Return the number of bytes buffered in rxrpc_send_data() 2007-06-18 23:30:41 -07:00
ar-peer.c [NETNS]: Add namespace parameter to ip_route_output_key. 2008-01-28 15:11:07 -08:00
ar-proc.c [NETFILTER/RXRPC]: Don't use seq_release_private where inappropriate. 2008-02-29 11:39:17 -08:00
ar-recvmsg.c RxRPC: fix rxrpc_recvmsg()'s returning of msg_name 2008-03-05 18:53:55 -08:00
ar-security.c [AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both 2007-04-26 15:48:28 -07:00
ar-skbuff.c [AF_RXRPC]: Add an interface to the AF_RXRPC module for the AFS filesystem to use 2007-04-26 15:50:17 -07:00
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