// Copyright: (C) 2009 Gilles Muller, Julia Lawall, INRIA, DIKU.  GPLv2.

@match exists@
expression x, E, E3;
position p1,p2;
statement S1,S2;
@@

x@p1 = rxrpc_get_transport(...)
... when != x = E
(
  if (x@p2 == NULL && ...) S1 else S2
|
  if (x@p2 == NULL || ...) S1 else S2
)

@other_match exists@
expression match.x, E1, E2, E3;
position p1!=match.p1,match.p2;
statement S1, S2;
@@

x@p1 = E1
... when != x = E2
(
  if (x@p2 == NULL && ...) S1 else S2
|
  if (x@p2 == NULL || ...) S1 else S2
)

@corr_null depends on !other_match @
expression x,E;
statement S1, S2;
position match.p2;
@@
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;