bind9/cocci/set_if_not_null.spatch
Ondřej Surý 60760420aa
Update the semantic patches to use new development ideas
Co-Authored-By: Markus Elfring <Markus.Elfring@web.de>
2025-10-08 17:22:10 +02:00

15 lines
188 B
Text

@replacement@
type T;
identifier fun, arg;
expression val;
@@
fun(..., T *arg, ...)
{
<+...
- if (arg != NULL)
- {
- *arg = val;
- }
+ SET_IF_NOT_NULL(arg, val);
...+>
}