mirror of
https://github.com/systemd/systemd
synced 2025-10-05 16:03:15 +02:00
coccinelle/take-fd: match for -EBADF instead of -1
Follow-up for 254d1313ae
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user