]> git.proxmox.com Git - mirror_frr.git/blame - tools/vty_check.cocci
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / tools / vty_check.cocci
CommitLineData
5304ba7e
DL
1/*
2 * VTY_DECLVAR_CONTEXT contains a built-in "if (!var) return;"
3 */
4@@
5identifier var, typ;
6statement S;
7@@
8
9 {
10 ...
11 \(
12 VTY_DECLVAR_CONTEXT(typ, var);
13 \|
14 VTY_DECLVAR_CONTEXT_SUB(typ, var);
15 \)
16 ...
17- if (
18- \( !var \| var == NULL \)
19- )
20- S
21 ...
22 }