Files
bind9/cocci/set_if_not_null.spatch
2025-10-08 17:22:10 +02:00

16 lines
188 B
Plaintext

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