fs/ceph: Move a dereference below a NULL test
If the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/). // <smpl> @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // </smpl> Signed-off-by: NJulia Lawall <julia@diku.dk> Signed-off-by: NSage Weil <sage@newdream.net>
Showing
想要评论请 注册 或 登录