@@ -3372,9 +3372,7 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
3372
3372
3373
3373
close_socket (sock);
3374
3374
3375
- if (quit) {
3376
- break ;
3377
- }
3375
+ if (quit) { break ; }
3378
3376
}
3379
3377
3380
3378
freeaddrinfo (result);
@@ -3475,7 +3473,7 @@ inline socket_t create_client_socket(
3475
3473
time_t write_timeout_usec, const std::string &intf, Error &error) {
3476
3474
auto sock = create_socket (
3477
3475
host, ip, port, address_family, 0 , tcp_nodelay, std::move (socket_options),
3478
- [&](socket_t sock2, struct addrinfo &ai, bool & quit) -> bool {
3476
+ [&](socket_t sock2, struct addrinfo &ai, bool & quit) -> bool {
3479
3477
if (!intf.empty ()) {
3480
3478
#ifdef USE_IF2IP
3481
3479
auto ip_from_if = if2ip (address_family, intf);
@@ -3500,9 +3498,7 @@ inline socket_t create_client_socket(
3500
3498
error = wait_until_socket_is_ready (sock2, connection_timeout_sec,
3501
3499
connection_timeout_usec);
3502
3500
if (error != Error::Success) {
3503
- if (error == Error::ConnectionTimeout) {
3504
- quit = true ;
3505
- }
3501
+ if (error == Error::ConnectionTimeout) { quit = true ; }
3506
3502
return false ;
3507
3503
}
3508
3504
}
@@ -6481,7 +6477,7 @@ Server::create_server_socket(const std::string &host, int port,
6481
6477
return detail::create_socket (
6482
6478
host, std::string (), port, address_family_, socket_flags, tcp_nodelay_,
6483
6479
std::move (socket_options),
6484
- [](socket_t sock, struct addrinfo &ai, bool & quit) -> bool {
6480
+ [](socket_t sock, struct addrinfo &ai, bool & /* quit*/ ) -> bool {
6485
6481
if (::bind (sock, ai.ai_addr , static_cast <socklen_t >(ai.ai_addrlen ))) {
6486
6482
return false ;
6487
6483
}
0 commit comments