]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/set_ensure_put.cocci
mkosi: Build images with --debug to aid debugging in CI
[thirdparty/systemd.git] / coccinelle / set_ensure_put.cocci
CommitLineData
64b92d63 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
de7fef4b
ZJS
2@@
3local idexpression r;
4expression p, k, x;
5@@
6- r = set_ensure_allocated(&p, k);
7- if (r < 0)
8- return ...;
9- r = set_put(p, x);
10+ r = set_ensure_put(&p, k, x);
11@@
12local idexpression r;
13expression p, k, x;
14@@
15- r = set_ensure_allocated(p, k);
16- if (r < 0)
17- return ...;
18- r = set_put(*p, x);
19+ r = set_ensure_put(p, k, x);