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

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/coccinelle/api/kstrdup.cocci+1−1
@@ -66,7 +66,7 @@ position p1,p2; · 65 unmodified lines
66 66
67* x = strlen(from) + 1;67* x = strlen(from) + 1;
68 ... when != \( x = E1 \| from = E1 \)68 ... when != \( x = E1 \| from = E1 \)
69* to = \(kmalloc@p1\|kzalloc@p2\)(x,flag);69* to = \(kmalloc@p1\|kzalloc@p1\)(x,flag);
70 ... when != \(x = E2 \| from = E2 \| to = E2 \)70 ... when != \(x = E2 \| from = E2 \| to = E2 \)
71 if (to==NULL || ...) S71 if (to==NULL || ...) S
72 ... when != \(x = E3 \| from = E3 \| to = E3 \)72 ... when != \(x = E3 \| from = E3 \| to = E3 \)