macro: introduce steal_fd()

parent 8259d86d
...@@ -400,4 +400,11 @@ enum { ...@@ -400,4 +400,11 @@ enum {
_ptr_; \ _ptr_; \
}) })
#define steal_fd(fd) \
({ \
int _fd_ = (fd); \
(fd) = -EBADF; \
_fd_; \
})
#endif /* __LXC_MACRO_H */ #endif /* __LXC_MACRO_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment