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

coccinelle: errno.cocci improvements

Apply to all log_*_errno loglevels.
This commit is contained in:
Michal Schmidt 2015-11-05 13:44:17 +01:00
parent 5263a45b5c
commit 351825cc73

View File

@ -1,48 +1,25 @@
@@
identifier r;
identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
local idexpression r;
expression e;
@@
- r = -e;
- log_error_errno(e,
+ r = log_error_errno(e,
...);
+ r =
log_LEVEL_errno(e, ...);
@@
identifier r;
identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
local idexpression r;
expression e;
@@
- log_error_errno(e,
+ r = log_error_errno(e,
...);
+ r =
log_LEVEL_errno(e, ...);
- r = -e;
@@
identifier r;
identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
local idexpression r;
expression e;
@@
- r = log_error_errno(e,
+ return log_error_errno(e,
...);
- return r;
@@
identifier r;
expression e;
@@
- r = -e;
- log_warning_errno(e,
+ r = log_warning_errno(e,
...);
@@
identifier r;
expression e;
@@
- log_warning_errno(e,
+ r = log_warning_errno(e,
...);
- r = -e;
@@
identifier r;
expression e;
@@
- r = log_warning_errno(e,
+ return log_warning_errno(e,
...);
- r =
+ return
log_LEVEL_errno(e, ...);
- return r;