Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
4c6c4794
Unverified
Commit
4c6c4794
authored
Feb 02, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memory_utils: add close_prot_errno_mov()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
e18aba7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
memory_utils.h
src/lxc/memory_utils.h
+9
-0
No files found.
src/lxc/memory_utils.h
View file @
4c6c4794
...
...
@@ -29,6 +29,15 @@
fd = -EBADF; \
}
#define close_prot_errno_move(fd, new_fd) \
if (fd >= 0) { \
int _e_ = errno; \
close(fd); \
errno = _e_; \
fd = new_fd; \
new_fd = -EBADF; \
}
static
inline
void
close_prot_errno_disarm_function
(
int
*
fd
)
{
close_prot_errno_disarm
(
*
fd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment