Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
225b90ee
Commit
225b90ee
authored
Oct 10, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use switch-case instead of if
parent
3931a0b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
src/shrpx_listen_handler.cc
src/shrpx_listen_handler.cc
+10
-9
No files found.
src/shrpx_listen_handler.cc
View file @
225b90ee
...
@@ -370,17 +370,18 @@ void perform_accept_pending_connection(ListenHandler *listener_handler,
...
@@ -370,17 +370,18 @@ void perform_accept_pending_connection(ListenHandler *listener_handler,
auto
fd
=
accept
(
server_fd
,
&
sockaddr
.
sa
,
&
addrlen
);
auto
fd
=
accept
(
server_fd
,
&
sockaddr
.
sa
,
&
addrlen
);
if
(
fd
==
-
1
)
{
if
(
fd
==
-
1
)
{
if
(
errno
==
EINTR
||
switch
(
errno
)
{
errno
==
ENETDOWN
||
case
EINTR
:
errno
==
EPROTO
||
case
ENETDOWN
:
errno
==
ENOPROTOOPT
||
case
EPROTO
:
errno
==
EHOSTDOWN
||
case
ENOPROTOOPT
:
case
EHOSTDOWN
:
#ifdef ENONET
#ifdef ENONET
errno
==
ENONET
||
case
ENONET
:
#endif // ENONET
#endif // ENONET
errno
==
EHOSTUNREACH
||
case
EHOSTUNREACH
:
errno
==
EOPNOTSUPP
||
case
EOPNOTSUPP
:
errno
==
ENETUNREACH
)
{
case
ENETUNREACH
:
continue
;
continue
;
}
}
...
...
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