]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/systemd-definitions.iso
docs: document new description field
[thirdparty/systemd.git] / coccinelle / systemd-definitions.iso
CommitLineData
b3fd7b53
FS
1/* Statement isomorphisms - replace explicit checks against NULL with a
2 * shorter variant, which relies on C's downgrade-to-bool feature.
3 * The expression metavariables should be declared as pointers, however,
4 * that doesn't work well with complex expressions like:
5 * if (UNIT(p)->default_dependencies != NULL)
6 */
7
8Statement
9@@
10expression X;
11statement S;
12@@
13if (X == NULL) S => if (!X) S
14
15Statement
16@@
17expression X;
18statement S;
19@@
20if (X != NULL) S => if (X) S