summaryrefslogtreecommitdiff
path: root/coccinelle/errno.cocci
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-11-09 21:56:49 +0100
committerDaniel Mack <github@zonque.org>2015-11-09 21:56:49 +0100
commitb0bc8dbd73b7d1f66f01849d89acca59c9fbc699 (patch)
treecf4ce91cd4a2c4dcf325ee210aa507b4dc5e78bb /coccinelle/errno.cocci
parent70d54fca18f52e20c07f37a6c86133229521ee47 (diff)
parente1427b138fbf7b7f13bb61187635b882be3ca2b2 (diff)
Merge pull request #1820 from michich/errno-v2
[v2] treewide: treatment of errno and other cleanups
Diffstat (limited to 'coccinelle/errno.cocci')
-rw-r--r--coccinelle/errno.cocci50
1 files changed, 17 insertions, 33 deletions
diff --git a/coccinelle/errno.cocci b/coccinelle/errno.cocci
index 45f2b6e9d5..ed74c0a98a 100644
--- a/coccinelle/errno.cocci
+++ b/coccinelle/errno.cocci
@@ -1,48 +1,32 @@
@@
-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,
- ...);
+- r =
++ return
+ log_LEVEL_errno(e, ...);
- return r;
@@
-identifier r;
+identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
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,
- ...);
-- return r;
++ return
+ log_LEVEL_errno(e, ...);
+- return -e;