]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/take-ptr.cocci
licensing: add spdx to our .cocci files
[thirdparty/systemd.git] / coccinelle / take-ptr.cocci
CommitLineData
64b92d63 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
ae2a15bc
LP
2@@
3local idexpression p;
4expression q;
5@@
6- p = q;
7- q = NULL;
8- return p;
9+ return TAKE_PTR(q);
10@@
11expression p, q;
12@@
13- p = q;
14- q = NULL;
15+ p = TAKE_PTR(q);