1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

coccinelle: add one more rule to use return value of log_xxx_errno()

This commit is contained in:
Yu Watanabe 2020-11-20 02:34:48 +09:00
parent 5abede3247
commit a61c0bdf39

View File

@ -30,3 +30,12 @@ expression e;
+ return
log_LEVEL_errno(e, ...);
- return -e;
@@
identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
expression list args;
expression e;
local idexpression r;
@@
- log_LEVEL_errno(e, args);
- r = e;
+ r = log_LEVEL_errno(e, args);