mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 02:03:37 +08:00
coccinelle: add a transformation for GNU conditionals
i.e. x ? x : y => x ?: y
This commit is contained in:
parent
d3a2a25fb4
commit
64254629f7
7
coccinelle/cond-omit-middle.cocci
Normal file
7
coccinelle/cond-omit-middle.cocci
Normal file
@ -0,0 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/* See: https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals */
|
||||
@@
|
||||
expression e, x;
|
||||
@@
|
||||
- e ? e : x
|
||||
+ e ?: x
|
Loading…
Reference in New Issue
Block a user