treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505
[linux-2.6-microblaze.git] / scripts / coccinelle / misc / boolinit.cocci
index b0584a3..fed6126 100644 (file)
@@ -1,10 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /// Bool initializations should use true and false.  Bool tests don't need
 /// comparisons.  Based on contributions from Joe Perches, Rusty Russell
 /// and Bruce W Allan.
 ///
 // Confidence: High
-// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.  GPLv2.
-// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.  GPLv2.
+// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
+// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
 // URL: http://coccinelle.lip6.fr/
 // Options: --include-headers
 
@@ -136,9 +137,14 @@ position p1;
 @r4 depends on !patch@
 bool b;
 position p2;
+identifier i;
 constant c != {0,1};
 @@
+(
+ b = i
+|
 *b@p2 = c
+)
 
 @script:python depends on org@
 p << r1.p;