diff options
author | Denis Efremov <efremov@linux.com> | 2020-06-19 16:23:07 +0300 |
---|---|---|
committer | Julia Lawall <Julia.Lawall@lip6.fr> | 2020-08-04 22:46:58 +0200 |
commit | 2fbecb7dfefdbe8250a86f92bb81d87deebc0488 (patch) | |
tree | ba84a6be8d9a9bde86b32e7ebd2e3929e3297875 /scripts/coccinelle | |
parent | abfc19ff202d287742483e15fd478ddd6ada2187 (diff) | |
download | linux-2fbecb7dfefdbe8250a86f92bb81d87deebc0488.tar.bz2 |
coccinelle: api/kstrdup: fix coccinelle position
There is a typo in rule r2. Position p1 should be attached to kzalloc()
call.
Fixes: 29a36d4dec6c ("scripts/coccinelle: improve the coverage of some semantic patches")
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r-- | scripts/coccinelle/api/kstrdup.cocci | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/coccinelle/api/kstrdup.cocci b/scripts/coccinelle/api/kstrdup.cocci index 19f2645e6076..3c6dc5469ee4 100644 --- a/scripts/coccinelle/api/kstrdup.cocci +++ b/scripts/coccinelle/api/kstrdup.cocci @@ -66,7 +66,7 @@ position p1,p2; * x = strlen(from) + 1; ... when != \( x = E1 \| from = E1 \) -* to = \(kmalloc@p1\|kzalloc@p2\)(x,flag); +* to = \(kmalloc@p1\|kzalloc@p1\)(x,flag); ... when != \(x = E2 \| from = E2 \| to = E2 \) if (to==NULL || ...) S ... when != \(x = E3 \| from = E3 \| to = E3 \) |