]> git.ipfire.org Git - thirdparty/systemd.git/blob - coccinelle/empty-to-root.cocci
mkosi: Build images with --debug to aid debugging in CI
[thirdparty/systemd.git] / coccinelle / empty-to-root.cocci
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 @@
3 expression s;
4 @@
5 - if (empty_or_root(s))
6 - s = "/";
7 + s = empty_to_root(s);
8 @@
9 expression s;
10 @@
11 - (empty_or_root(s) ? "/" : s)
12 + empty_to_root(s)
13 @@
14 expression s;
15 @@
16 - (s ? s : "/")
17 + empty_to_root(s)