From b3e3bb19a06795ee1eb3679a839f4687ba99143f Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 5 Nov 2015 13:44:18 +0100 Subject: coccinelle: additional errno.cocci hunk rewrites: log_error_errno(errno, ...); return -errno; into: return log_error_errno(errno, ...); --- coccinelle/errno.cocci | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'coccinelle') 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; -- cgit v1.2.3-54-g00ecf