Skip to content

Commit 2fbecb7

Browse files
evdenisJuliaLawall
authored andcommitted
coccinelle: api/kstrdup: fix coccinelle position
There is a typo in rule r2. Position p1 should be attached to kzalloc() call. Fixes: 29a36d4 ("scripts/coccinelle: improve the coverage of some semantic patches") Signed-off-by: Denis Efremov <[email protected]> Signed-off-by: Julia Lawall <[email protected]>
1 parent abfc19f commit 2fbecb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/coccinelle/api/kstrdup.cocci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ position p1,p2;
6666

6767
* x = strlen(from) + 1;
6868
... when != \( x = E1 \| from = E1 \)
69-
* to = \(kmalloc@p1\|kzalloc@p2\)(x,flag);
69+
* to = \(kmalloc@p1\|kzalloc@p1\)(x,flag);
7070
... when != \(x = E2 \| from = E2 \| to = E2 \)
7171
if (to==NULL || ...) S
7272
... when != \(x = E3 \| from = E3 \| to = E3 \)

0 commit comments

Comments
 (0)