commit | 76c317d6e5cb7f58541879006d39774596962715 | [log] [tgz] |
---|---|---|
author | Julia Lawall <julia@diku.dk> | Sun Jul 19 17:26:13 2009 +0200 |
committer | Jiri Kosina <jkosina@suse.cz> | Mon Jul 20 00:03:35 2009 +0200 |
tree | c92ad2c0b1e4b849d99bf6c97df87b637f1fd4f6 | |
parent | 4859484b0957ddc7fe3e0fa349d98b0f1c7876bd [diff] |
HID: Move dereferences below a NULL test If the NULL test is necessary, then the dereferences should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; expression E,E1; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E=E1 when != i if (E == NULL||...) S + i = E->fld; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>