summaryrefslogtreecommitdiff
path: root/coccinelle/empty-to-root.cocci
blob: 45627c98019bbee737a980761385f3674af25de9 (plain)
1
2
3
4
5
6
7
8
9
10
11
@@
expression s;
@@
- if (empty_or_root(s))
-         s = "/";
+ s = empty_to_root(s);
@@
expression s;
@@
- (empty_or_root(s) ? "/" : s)
+ empty_to_root(s)