summaryrefslogtreecommitdiff
path: root/coccinelle/errno.cocci
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:17 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-09 20:01:06 +0100
commit351825cc7355fec1c7fc6cb46c16ba68f2aea76c (patch)
treeb125dc81dff0751398d216b050cce1485e79785a /coccinelle/errno.cocci
parent5263a45b5cb3e51b95253a0eab789e33c4010f20 (diff)
coccinelle: errno.cocci improvements
Apply to all log_*_errno loglevels.
Diffstat (limited to 'coccinelle/errno.cocci')
-rw-r--r--coccinelle/errno.cocci49
1 files changed, 13 insertions, 36 deletions
diff --git a/coccinelle/errno.cocci b/coccinelle/errno.cocci
index 45f2b6e9d5..0b14d22438 100644
--- a/coccinelle/errno.cocci
+++ b/coccinelle/errno.cocci
@@ -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;