Skip to content

Commit bb00a23

Browse files
committed
Apply clangformat
1 parent 63d6e9b commit bb00a23

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

httplib.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,8 @@ inline ssize_t select_write(socket_t sock, time_t sec, time_t usec) {
23152315
#endif
23162316
}
23172317

2318-
inline Error wait_until_socket_is_ready(socket_t sock, time_t sec, time_t usec) {
2318+
inline Error wait_until_socket_is_ready(socket_t sock, time_t sec,
2319+
time_t usec) {
23192320
#ifdef CPPHTTPLIB_USE_POLL
23202321
struct pollfd pfd_read;
23212322
pfd_read.fd = sock;
@@ -2325,9 +2326,7 @@ inline Error wait_until_socket_is_ready(socket_t sock, time_t sec, time_t usec)
23252326

23262327
auto poll_res = handle_EINTR([&]() { return poll(&pfd_read, 1, timeout); });
23272328

2328-
if (poll_res == 0) {
2329-
return Error::ConnectionTimeout;
2330-
}
2329+
if (poll_res == 0) { return Error::ConnectionTimeout; }
23312330

23322331
if (poll_res > 0 && pfd_read.revents & (POLLIN | POLLOUT)) {
23332332
int error = 0;
@@ -2359,9 +2358,7 @@ inline Error wait_until_socket_is_ready(socket_t sock, time_t sec, time_t usec)
23592358
return select(static_cast<int>(sock + 1), &fdsr, &fdsw, &fdse, &tv);
23602359
});
23612360

2362-
if (ret == 0) {
2363-
return Error::ConnectionTimeout;
2364-
}
2361+
if (ret == 0) { return Error::ConnectionTimeout; }
23652362

23662363
if (ret > 0 && (FD_ISSET(sock, &fdsr) || FD_ISSET(sock, &fdsw))) {
23672364
int error = 0;
@@ -2703,9 +2700,7 @@ inline socket_t create_client_socket(
27032700
}
27042701
error = wait_until_socket_is_ready(sock2, connection_timeout_sec,
27052702
connection_timeout_usec);
2706-
if (error != Error::Success) {
2707-
return false;
2708-
}
2703+
if (error != Error::Success) { return false; }
27092704
}
27102705

27112706
set_nonblocking(sock2, false);

0 commit comments

Comments
 (0)