mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
DEV: coccinelle: Fix incorrect replacement in ist.cocci
We must not use `ist2()` if the value of `i.len` is derived from the value of
`i.ptr`:
i.ptr = "foo";
i.len = strlen(i.ptr);
This commit is contained in:
parent
ab398d8ff9
commit
99f47377c8
1 changed files with 5 additions and 0 deletions
|
|
@ -3,9 +3,14 @@ struct ist i;
|
|||
expression p, l;
|
||||
@@
|
||||
|
||||
(
|
||||
i.ptr = p;
|
||||
i.len = strlen(i.ptr);
|
||||
|
|
||||
- i.ptr = p;
|
||||
- i.len = l;
|
||||
+ i = ist2(p, l);
|
||||
)
|
||||
|
||||
@@
|
||||
@@
|
||||
|
|
|
|||
Loading…
Reference in a new issue