diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-12-22 04:40:28 +0100 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-01-29 05:06:19 +0100 |
commit | 33c7da0590d4e9e7420f8cf50722c4fe6932218f (patch) | |
tree | 5d93a95224b0cf72e245ff897ef3ecd96428ddb4 /.mailmap | |
parent | [SCSI] bnx2fc: remove useless calls to memset(). (diff) | |
download | linux-33c7da0590d4e9e7420f8cf50722c4fe6932218f.tar.xz linux-33c7da0590d4e9e7420f8cf50722c4fe6932218f.zip |
[SCSI] bnx2fc: Remove potential NULL dereference
If the NULL test is necessary, the initialization involving a dereference of
the tested value should be moved after the NULL test.
The sematic patch that fixes this problem 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: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions