Skip to content

Commit 525c7e9

Browse files
committed
Code format
1 parent 7d86835 commit 525c7e9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

httplib.h

+4-8
Original file line numberDiff line numberDiff line change
@@ -3372,9 +3372,7 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
33723372

33733373
close_socket(sock);
33743374

3375-
if (quit) {
3376-
break;
3377-
}
3375+
if (quit) { break; }
33783376
}
33793377

33803378
freeaddrinfo(result);
@@ -3475,7 +3473,7 @@ inline socket_t create_client_socket(
34753473
time_t write_timeout_usec, const std::string &intf, Error &error) {
34763474
auto sock = create_socket(
34773475
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 {
34793477
if (!intf.empty()) {
34803478
#ifdef USE_IF2IP
34813479
auto ip_from_if = if2ip(address_family, intf);
@@ -3500,9 +3498,7 @@ inline socket_t create_client_socket(
35003498
error = wait_until_socket_is_ready(sock2, connection_timeout_sec,
35013499
connection_timeout_usec);
35023500
if (error != Error::Success) {
3503-
if (error == Error::ConnectionTimeout) {
3504-
quit = true;
3505-
}
3501+
if (error == Error::ConnectionTimeout) { quit = true; }
35063502
return false;
35073503
}
35083504
}
@@ -6481,7 +6477,7 @@ Server::create_server_socket(const std::string &host, int port,
64816477
return detail::create_socket(
64826478
host, std::string(), port, address_family_, socket_flags, tcp_nodelay_,
64836479
std::move(socket_options),
6484-
[](socket_t sock, struct addrinfo &ai, bool& quit) -> bool {
6480+
[](socket_t sock, struct addrinfo &ai, bool & /*quit*/) -> bool {
64856481
if (::bind(sock, ai.ai_addr, static_cast<socklen_t>(ai.ai_addrlen))) {
64866482
return false;
64876483
}

0 commit comments

Comments
 (0)