From 351825cc7355fec1c7fc6cb46c16ba68f2aea76c Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 5 Nov 2015 13:44:17 +0100 Subject: coccinelle: errno.cocci improvements Apply to all log_*_errno loglevels. --- coccinelle/errno.cocci | 49 +++++++++++++------------------------------------ 1 file 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; -- cgit v1.2.3-54-g00ecf