mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 06:14:35 +00:00
tools: Add coccinelle script to check if we use shorthand operators
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
0445dc7d4e
commit
c33b17feb1
12
scripts/coccinelle/shorthand_operator.cocci
Normal file
12
scripts/coccinelle/shorthand_operator.cocci
Normal file
@ -0,0 +1,12 @@
|
||||
@@
|
||||
identifier data;
|
||||
constant x;
|
||||
@@
|
||||
|
||||
(
|
||||
- data = data + x
|
||||
+ data += x
|
||||
|
|
||||
- data = data - x
|
||||
+ data -= x
|
||||
)
|
Loading…
Reference in New Issue
Block a user