]> git.ipfire.org Git - thirdparty/kernel/stable.git/blame - scripts/coccinelle/misc/ifaddr.cocci
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505
[thirdparty/kernel/stable.git] / scripts / coccinelle / misc / ifaddr.cocci
CommitLineData
7f904d7e 1// SPDX-License-Identifier: GPL-2.0-only
dd494ac0 2/// The address of a variable or field is likely always to be non-zero.
4619c2b8
JL
3///
4// Confidence: High
7f904d7e
TG
5// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
4619c2b8
JL
7// URL: http://coccinelle.lip6.fr/
8// Comments:
93f14468 9// Options: --no-includes --include-headers
4619c2b8
JL
10
11virtual org
12virtual report
13virtual context
14
15@r@
16expression x;
17statement S1,S2;
18position p;
19@@
20
21*if@p (&x)
22 S1 else S2
23
24@script:python depends on org@
25p << r.p;
26@@
27
28cocci.print_main("test of a variable/field address",p)
29
30@script:python depends on report@
31p << r.p;
32@@
33
34msg = "ERROR: test of a variable/field address"
35coccilib.report.print_report(p[0],msg)