diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-07-08 20:33:26 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-07-09 07:07:48 +0200 |
commit | 906682a1dee6b718ba01194a5e0af92f9a2dc7c1 (patch) | |
tree | cf0ffe774d88cdc5a6cb4ee0b98594a31ff959b1 /coccinelle | |
parent | LICENSES/README.md: fix syntax (diff) | |
download | systemd-906682a1dee6b718ba01194a5e0af92f9a2dc7c1.tar.xz systemd-906682a1dee6b718ba01194a5e0af92f9a2dc7c1.zip |
coccinelle/take-fd: match for -EBADF instead of -1
Follow-up for 254d1313ae5a69c08c9b93032aaaf3d6083cfc07
Diffstat (limited to 'coccinelle')
-rw-r--r-- | coccinelle/take-fd.cocci | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coccinelle/take-fd.cocci b/coccinelle/take-fd.cocci index 396d6965c7..15f1e7c2ce 100644 --- a/coccinelle/take-fd.cocci +++ b/coccinelle/take-fd.cocci @@ -4,7 +4,7 @@ local idexpression p; expression q; @@ - p = q; -- q = -1; +- q = -EBADF; - return p; + return TAKE_FD(q); @@ -18,5 +18,5 @@ expression p != errno; expression q; @@ - p = q; -- q = -1; +- q = -EBADF; + p = TAKE_FD(q); |