From: Yu Watanabe Date: Thu, 26 Nov 2020 23:47:26 +0000 (+0900) Subject: coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro X-Git-Tag: v248-rc1~627^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17732%2Fhead;p=thirdparty%2Fsystemd.git coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro --- diff --git a/coccinelle/synthetic-errno.cocci b/coccinelle/synthetic-errno.cocci index 3d9af0db21b..dcae069f748 100644 --- a/coccinelle/synthetic-errno.cocci +++ b/coccinelle/synthetic-errno.cocci @@ -15,9 +15,15 @@ log_debug("Found no default boot entry :("); expression e; expression list args; @@ +( +/* Ignore specific cases in src/import/{export,import,pull}.c where we want to return positive value on success. */ +log_info("Exiting."); +return -r; +| - log_info(args); - return -e; + return log_info_errno(SYNTHETIC_ERRNO(e), args); +) @@ expression e; expression list args;