1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-18 10:04:04 +03:00

coccinelle/take-fd: match for -EBADF instead of -1

Follow-up for 254d1313ae5a69c08c9b93032aaaf3d6083cfc07
This commit is contained in:
Mike Yuan 2023-07-09 02:33:26 +08:00 committed by Yu Watanabe
parent 49ddb4757b
commit 906682a1de

View File

@ -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);