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
644e7393
Unverified
Commit
644e7393
authored
Mar 15, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree-wide: remove last -1 fd initialization with cleanup macros in favor of -EBADF
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
f62cf1d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
attach.c
src/lxc/attach.c
+1
-1
uuid.c
src/lxc/uuid.c
+1
-1
No files found.
src/lxc/attach.c
View file @
644e7393
...
...
@@ -131,7 +131,7 @@ static void lxc_proc_put_context_info(struct lxc_proc_context_info *ctx)
*/
static
int
in_same_namespace
(
pid_t
pid1
,
pid_t
pid2
,
const
char
*
ns
)
{
__do_close
int
ns_fd1
=
-
1
,
ns_fd2
=
-
1
;
__do_close
int
ns_fd1
=
-
EBADF
,
ns_fd2
=
-
EBADF
;
int
ret
=
-
1
;
struct
stat
ns_st1
,
ns_st2
;
...
...
src/lxc/uuid.c
View file @
644e7393
...
...
@@ -39,7 +39,7 @@ static lxc_id128_t make_v4_uuid(lxc_id128_t id)
static
int
get_random_bytes
(
void
*
p
,
size_t
n
)
{
__do_close
int
fd
=
-
1
;
__do_close
int
fd
=
-
EBADF
;
ssize_t
bytes
=
0
;
fd
=
open
(
"/dev/urandom"
,
O_RDONLY
|
O_CLOEXEC
|
O_NOCTTY
);
...
...
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