Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
d262c52e
Commit
d262c52e
authored
Nov 20, 2015
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: use close_noerr.
Signed-off-by:
Rusty Russell
<
rusty@rustcorp.com.au
>
parent
1fe2fa08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
ccan/net/net.c
ccan/net/net.c
+2
-4
No files found.
ccan/net/net.c
View file @
d262c52e
...
...
@@ -231,7 +231,7 @@ static bool should_listen(const struct addrinfo *addrinfo)
static
int
make_listen_fd
(
const
struct
addrinfo
*
addrinfo
)
{
int
saved_errno
,
fd
,
on
=
1
;
int
fd
,
on
=
1
;
fd
=
socket
(
addrinfo
->
ai_family
,
addrinfo
->
ai_socktype
,
addrinfo
->
ai_protocol
);
...
...
@@ -247,9 +247,7 @@ static int make_listen_fd(const struct addrinfo *addrinfo)
return
fd
;
fail:
saved_errno
=
errno
;
close
(
fd
);
errno
=
saved_errno
;
close_noerr
(
fd
);
return
-
1
;
}
...
...
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