Skip to content

Commit

Permalink
coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwata committed Nov 27, 2020
1 parent ba71542 commit 61c26ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions coccinelle/synthetic-errno.cocci
Expand Up @@ -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;
Expand Down

0 comments on commit 61c26ca

Please sign in to comment.