licensing: add spdx to our .cocci files

Since those are chunks of code based on our codebase, it's easiest to use the
same license.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-10-01 12:28:36 +02:00
parent ed77c2de1f
commit 64b92d637c
52 changed files with 54 additions and 1 deletions

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
bool b;
expression y;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression fd;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression x, y;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
constant s;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
@@
(

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression x, y;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* We want to stick with dup() in test-fd-util.c */
position p : script:python() { p[0].file != "src/test/test-fd-util.c" };

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression s;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression s;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* Avoid running this transformation on the empty_to_null function itself */
position p : script:python() { p[0].current_element != "empty_to_null" };

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression s;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
@@
- ENOTSUP

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression e;
statement s;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
constant c;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
local idexpression r;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
@@
- exit(0);

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* Disable this transformation in cases where it doesn't make sense or
* where it makes the resulting expression more confusing

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression f, path, options;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p, q;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression s;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Limit the number of expressions to 6 for performance reasons */
@@
expression e;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression x, y, p, l;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* Disable this transformation for the test-string-util.c */
position p : script:python() { p[0].file != "src/test/test-string-util.c" };

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression e, v, flags;
expression list args;

View File

@ -1,4 +1,6 @@
/* Collected macros from our systemd codebase to make the cocci semantic
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Collected macros from our systemd codebase to make the cocci semantic
* parser happy. Inspired by the original cocci macros file
* /usr/lib64/coccinelle/standard.h (including the YACFE_* symbols)
*/

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression q, n, m;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression s;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* Avoid running this transformation on the mfree function itself */
position p : script:python() { p[0].current_element != "mfree" };

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p, q;
identifier r;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Limit the number of expressions to 6 for performance reasons */
@@
expression e;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
@@
- O_NDELAY

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression q, p, n, m;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression r;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression fd;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression fd;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
local idexpression r;
expression p, k, x;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* Avoid running this transformation on the strempty function itself and
* on the "make_expression" macro in src/libsystemd/sd-bus/bus-convenience.c.

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
position p : script:python() { p[0].current_element != "test_strjoin" };
expression t;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
position p : script:python() { p[0].current_element != "test_strjoina" };
expression n, m;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression x, y, z;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression e;
expression list args;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
local idexpression p;
expression q;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
local idexpression p;
expression q;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
statement s;
@@

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
position p : script:python() { not p[0].file.startswith("man/") };
expression e, fmt;

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
position p : script:python() { p[0].file != "src/journal/lookup3.c" };
identifier id;