This replaces `i.ptr + i.len` by `istend()`.
---
 dev/coccinelle/ist.cocci | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dev/coccinelle/ist.cocci b/dev/coccinelle/ist.cocci
index 598ffa3e2..5b6aa6b2c 100644
--- a/dev/coccinelle/ist.cocci
+++ b/dev/coccinelle/ist.cocci
@@ -41,6 +41,13 @@ struct ist i;
 struct ist i;
 @@
 
+- (\(i.ptr\|istptr(i)\) + \(i.len\|istlen(i)\))
++ istend(i)
+
+@@
+struct ist i;
+@@
+
 - i.ptr != NULL
 + isttest(i)
 
-- 
2.33.1


Reply via email to