summaryrefslogtreecommitdiff
path: root/coccinelle/errno.cocci
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:18 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-09 20:01:06 +0100
commitb3e3bb19a06795ee1eb3679a839f4687ba99143f (patch)
tree9648c9335994d3744bbdd5210266b05c3964d85d /coccinelle/errno.cocci
parent351825cc7355fec1c7fc6cb46c16ba68f2aea76c (diff)
coccinelle: additional errno.cocci hunk
rewrites: log_error_errno(errno, ...); return -errno; into: return log_error_errno(errno, ...);
Diffstat (limited to 'coccinelle/errno.cocci')
-rw-r--r--coccinelle/errno.cocci7
1 files changed, 7 insertions, 0 deletions
diff --git a/coccinelle/errno.cocci b/coccinelle/errno.cocci
index 0b14d22438..ed74c0a98a 100644
--- a/coccinelle/errno.cocci
+++ b/coccinelle/errno.cocci
@@ -23,3 +23,10 @@ expression e;
+ return
log_LEVEL_errno(e, ...);
- return r;
+@@
+identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
+expression e;
+@@
++ return
+ log_LEVEL_errno(e, ...);
+- return -e;