2021-10-01 03:28:36 -07:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2018-03-22 09:04:29 -07:00
|
|
|
@@
|
|
|
|
local idexpression p;
|
|
|
|
expression q;
|
|
|
|
@@
|
|
|
|
- p = q;
|
2023-07-08 11:33:26 -07:00
|
|
|
- q = -EBADF;
|
2018-03-22 09:04:29 -07:00
|
|
|
- return p;
|
|
|
|
+ return TAKE_FD(q);
|
2019-04-27 03:26:22 -07:00
|
|
|
|
|
|
|
/* The ideal solution would use 'local idexpression' to avoid matching errno,
|
|
|
|
* which is a global variable. However, 'idexpression' nor 'identifier'
|
|
|
|
* would match, for example, "x->fd", which is considered 'expression' in
|
|
|
|
* the SmPL grammar
|
|
|
|
*/
|
2018-03-22 09:04:29 -07:00
|
|
|
@@
|
2019-04-27 03:26:22 -07:00
|
|
|
expression p != errno;
|
|
|
|
expression q;
|
2018-03-22 09:04:29 -07:00
|
|
|
@@
|
|
|
|
- p = q;
|
2023-07-08 11:33:26 -07:00
|
|
|
- q = -EBADF;
|
2018-03-22 09:04:29 -07:00
|
|
|
+ p = TAKE_FD(q);
|