clang-format

pull/2127/head
Tatsuhiro Tsujikawa 2023-11-02 19:27:35 +09:00
parent df27e60385
commit d607327ea6
9 changed files with 58 additions and 57 deletions

View File

@ -39,8 +39,7 @@
namespace aria2 {
class BtChokingEvent {
};
class BtChokingEvent {};
} // namespace aria2

View File

@ -179,8 +179,7 @@ public:
};
#else // !ENABLE_ASYNC_DNS
template <typename SocketEntry, typename EventPoll>
class ADNSEvent : public Event<SocketEntry> {
};
class ADNSEvent : public Event<SocketEntry> {};
#endif // !ENABLE_ASYNC_DNS
template <typename CommandEvent, typename ADNSEvent> class SocketEntry {
@ -362,8 +361,7 @@ public:
}
};
#else // !ENABLE_ASYNC_DNS
template <typename EventPoll> class AsyncNameResolverEntry {
};
template <typename EventPoll> class AsyncNameResolverEntry {};
#endif // !ENABLE_ASYNC_DNS
} // namespace aria2

View File

@ -48,8 +48,7 @@ class RequestGroup;
namespace rpc {
class WebSocketSession {
};
class WebSocketSession {};
class WebSocketSessionMan {
public:

View File

@ -865,7 +865,8 @@ void SocketCore::readData(void* data, size_t& len)
#endif // HAVE_LIBSSH2
if (!secure_) {
// Cast for Windows recv()
while ((ret = recv(sockfd_, reinterpret_cast<char*>(data), len, 0)) == -1 &&
while ((ret = recv(sockfd_, reinterpret_cast<char*>(data), len, 0)) ==
-1 &&
SOCKET_ERRNO == A2_EINTR)
;
int errNum = SOCKET_ERRNO;

View File

@ -303,7 +303,8 @@ std::unique_ptr<Cookie> parse(const std::string& cookieStr,
if (n > std::numeric_limits<int64_t>::max() - delta) {
maxAge = std::numeric_limits<time_t>::max();
} else {
}
else {
n += delta;
if (n < 0 || std::numeric_limits<time_t>::max() < n) {

View File

@ -87,7 +87,8 @@ static char* eai_errlist[] = {
/*
* gai_strerror().
*/
const char* gai_strerror(ecode) int ecode;
const char* gai_strerror(ecode)
int ecode;
{
if (ecode < 0 || ecode > EAI_SYSTEM)
return _("Unknown error");

View File

@ -224,7 +224,8 @@ static int itoa_length();
/*
* gai_strerror().
*/
const char* gai_strerror(ecode) int ecode;
const char* gai_strerror(ecode)
int ecode;
{
if (ecode < 0 || ecode > EAI_SYSTEM)
return _("Unknown error");
@ -295,7 +296,8 @@ static int is_address(s) const char* s;
* Calcurate length of the string `s', where `s' is set by
* sprintf(s, "%d", n).
*/
static int itoa_length(n) int n;
static int itoa_length(n)
int n;
{
int result = 1;