commit | 958f50454a1aeffcef1de262e351ca0e7d3a00ac | [log] [tgz] |
---|---|---|
author | Tim Duesterhus <tim@bastelstu.be> | Sat Nov 06 15:14:43 2021 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Nov 08 07:58:18 2021 +0100 |
tree | 265bef3c96ce42933a8a7063b6b1ac8a6d7cf47d | |
parent | 9c523f10426ecb062a1f2bf2abfbf49e1d75343b [diff] |
DEV: coccinelle: Add rule to use `istend()` where possible This replaces `i.ptr + i.len` by `istend()`.
diff --git a/dev/coccinelle/ist.cocci b/dev/coccinelle/ist.cocci index 598ffa3..5b6aa6b 100644 --- a/dev/coccinelle/ist.cocci +++ b/dev/coccinelle/ist.cocci
@@ -41,6 +41,13 @@ struct ist i; @@ +- (\(i.ptr\|istptr(i)\) + \(i.len\|istlen(i)\)) ++ istend(i) + +@@ +struct ist i; +@@ + - i.ptr != NULL + isttest(i)