ntifier g,y;
statement S1,S2;
@@
*e = &f->g
<+...
f->y
...+>
*if (e != NULL || ...)
S1 else S2
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/target/target_core_fabric_configfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
... when != ret = e1
*x = alloc(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
return ret;
}
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/scsi/qla4xxx/ql4_os.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers
This patch does away with cast on void * and the if as it is unnecessary.
The following Coccinelle semantic patch was used for making the change:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Himangi Sara
!= \(from = E1 \| to = E1 \)
if (to==NULL || ...) S
... when != \(from = E2 \| to = E2 \)
- strcpy(to, from);
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi
!= \(from = E1 \| to = E1 \)
if (to==NULL || ...) S
... when != \(from = E2 \| to = E2 \)
- strcpy(to, from);
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/scsi/aic7xxx/aic7770_osm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi
);
... when != \(from = E1 \| to = E1 \)
if (to==NULL || ...) S
... when != \(from = E2 \| to = E2 \)
- strcpy(to, from);
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a
6 matches
Mail list logo