]> git.ipfire.org Git - thirdparty/systemd.git/blob - coccinelle/cmp.cocci
Merge pull request #32784 from YHNdnzj/release-version
[thirdparty/systemd.git] / coccinelle / cmp.cocci
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 @@
3 expression x, y;
4 @@
5 - if (x < y)
6 - return -1;
7 - if (x > y)
8 - return 1;
9 - return 0;
10 + return CMP(x, y);
11 @@
12 expression x, y;
13 @@
14 - if (x < y)
15 - return -1;
16 - else if (x > y)
17 - return 1;
18 - return 0;
19 + return CMP(x, y);
20 @@
21 expression x, y;
22 @@
23 - if (x < y)
24 - return -1;
25 - else if (x > y)
26 - return 1;
27 - else
28 - return 0;
29 + return CMP(x, y);