History

coccinelle: api/kstrdup: fix coccinelle position

There is a typo in rule r2. Position p1 should be attached to kzalloc() call.

Denis Efremov committed 6 years ago

Commit 2fbecb71 parent abfc19f1 file · +1 −1Browse files

Unified · Split

scripts/coccinelle/api/kstrdup.cocci+1−1
@@ -66,7 +66,7 @@ position p1,p2; · 65 unmodified lines
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 \)