diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/coccinelle/strbuf.cocci | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/coccinelle/strbuf.cocci b/tools/coccinelle/strbuf.cocci index 83bd93be5f..f586128329 100644 --- a/tools/coccinelle/strbuf.cocci +++ b/tools/coccinelle/strbuf.cocci @@ -71,3 +71,10 @@ identifier fn, param; { ... } + +// In modern codebase, .buf member of an empty strbuf is not NULL. +@@ +struct strbuf SB; +@@ +- SB.buf ? SB.buf : "" ++ SB.buf |
