]>
git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/take-ptr.cocci
Commit | Line | Data |
ae2a15bc LP |
1 | @@ |
2 | local idexpression p; |
3 | expression q; |
4 | @@ |
5 | - p = q; |
6 | - q = NULL; |
7 | - return p; |
8 | + return TAKE_PTR(q); |
9 | @@ |
10 | expression p, q; |
11 | @@ |
12 | - p = q; |
13 | - q = NULL; |
14 | + p = TAKE_PTR(q); |