Skip to content

Commit 3772d17

Browse files
committed
Fix some typos
1 parent 8bf280b commit 3772d17

File tree

12 files changed

+21
-21
lines changed

12 files changed

+21
-21
lines changed

third_party/wepoll/Wepoll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ int init(void)
902902
/* `InitOnceExecuteOnce()` itself is infallible, and it doesn't set any
903903
* error code when the once-callback returns FALSE. We return -1 here to
904904
* indicate that global initialization failed; the failing init function
905-
* is resposible for setting `errno` and calling `SetLastError()`. */
905+
* is responsible for setting `errno` and calling `SetLastError()`. */
906906
return -1;
907907

908908
return 0;

trantor/net/EventLoop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum
4545

4646
/**
4747
* @brief As the name implies, this class represents an event loop that runs in
48-
* a perticular thread. The event loop can handle network I/O events and timers
48+
* a particular thread. The event loop can handle network I/O events and timers
4949
* in asynchronous mode.
5050
* @note An event loop object always belongs to a separate thread, and there is
5151
* one event loop object at most in a thread. We can call an event loop object

trantor/net/InetAddress.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class TRANTOR_EXPORT InetAddress
219219
}
220220

221221
/**
222-
* @brief Return true if the address is not initalized.
222+
* @brief Return true if the address is not initialized.
223223
*/
224224
inline bool isUnspecified() const
225225
{

trantor/net/inner/Acceptor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void Acceptor::readCallback()
8383
}
8484
else
8585
{
86-
LOG_SYSERR << "Accpetor::readCallback";
86+
LOG_SYSERR << "Acceptor::readCallback";
8787
// Read the section named "The special problem of
8888
// accept()ing when you can't" in libev's doc.
8989
// By Marc Lehmann, author of libev.

trantor/net/inner/poller/EpollPoller.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const int kDeleted = 2;
5353
EpollPoller::EpollPoller(EventLoop *loop)
5454
: Poller(loop),
5555
#ifdef _WIN32
56-
// wepoll does not suppor flags
56+
// wepoll does not support flags
5757
epollfd_(::epoll_create1(0)),
5858
#else
5959
epollfd_(::epoll_create1(EPOLL_CLOEXEC)),
@@ -85,7 +85,7 @@ void EpollPoller::poll(int timeoutMs, ChannelList *activeChannels)
8585
// Timestamp now(Timestamp::now());
8686
if (numEvents > 0)
8787
{
88-
// LOG_TRACE << numEvents << " events happended";
88+
// LOG_TRACE << numEvents << " events happened";
8989
fillActiveChannels(numEvents, activeChannels);
9090
if (static_cast<size_t>(numEvents) == events_.size())
9191
{
@@ -94,7 +94,7 @@ void EpollPoller::poll(int timeoutMs, ChannelList *activeChannels)
9494
}
9595
else if (numEvents == 0)
9696
{
97-
// std::cout << "nothing happended" << std::endl;
97+
// std::cout << "nothing happened" << std::endl;
9898
}
9999
else
100100
{

trantor/net/inner/poller/KQueue.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void KQueue::poll(int timeoutMs, ChannelList *activeChannels)
5959
// Timestamp now(Timestamp::now());
6060
if (numEvents > 0)
6161
{
62-
// LOG_TRACE << numEvents << " events happended";
62+
// LOG_TRACE << numEvents << " events happened";
6363
fillActiveChannels(numEvents, activeChannels);
6464
if (static_cast<size_t>(numEvents) == events_.size())
6565
{
@@ -68,7 +68,7 @@ void KQueue::poll(int timeoutMs, ChannelList *activeChannels)
6868
}
6969
else if (numEvents == 0)
7070
{
71-
// std::cout << "nothing happended" << std::endl;
71+
// std::cout << "nothing happened" << std::endl;
7272
}
7373
else
7474
{

trantor/net/inner/poller/PollPoller.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ PollPoller::PollPoller(EventLoop* loop) : Poller(loop)
3030
{
3131
std::call_once(warning_flag, []() {
3232
LOG_WARN << "Creating a PollPoller. This poller is slow and should "
33-
"only be used when no other pollers are avaliable";
33+
"only be used when no other pollers are available";
3434
});
3535
}
3636

trantor/net/inner/tlsprovider/BotanTLSProvider.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,6 @@ SSLContextPtr trantor::newSSLContext(const TLSPolicy &policy, bool server)
487487

488488
if (policy.getUseOldTLS())
489489
LOG_WARN << "SSLPloicy have set useOldTLS to true. BUt Botan does not "
490-
"support TLS/SSL below TLS 1.2. Ignoreing this option.";
490+
"support TLS/SSL below TLS 1.2. Ignoring this option.";
491491
return ctx;
492492
}

trantor/net/inner/tlsprovider/OpenSSLProvider.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static bool validatePeerCertificate(SSL *ssl,
133133
{
134134
assert(ssl != nullptr);
135135
assert(cert != nullptr);
136-
LOG_TRACE << "Validating peer cerificate";
136+
LOG_TRACE << "Validating peer certificate";
137137

138138
if (isServer)
139139
{

trantor/utils/AsyncFileLogger.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ AsyncFileLogger::~AsyncFileLogger()
6464
}
6565
while (!writeBuffers_.empty())
6666
{
67-
StringPtr tmpPtr = (StringPtr &&) writeBuffers_.front();
67+
StringPtr tmpPtr = (StringPtr &&)writeBuffers_.front();
6868
writeBuffers_.pop();
6969
writeLogToFile(tmpPtr);
7070
}
@@ -162,7 +162,7 @@ void AsyncFileLogger::logThreadFunc()
162162

163163
while (!tmpBuffers_.empty())
164164
{
165-
StringPtr tmpPtr = (StringPtr &&) tmpBuffers_.front();
165+
StringPtr tmpPtr = (StringPtr &&)tmpBuffers_.front();
166166
tmpBuffers_.pop();
167167
writeLogToFile(tmpPtr);
168168
tmpPtr->clear();

trantor/utils/Logger.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ class TRANTOR_EXPORT Logger : public NonCopyable
288288
#endif
289289
return logLevel;
290290
}
291-
static std::function<void(const char *msg, const uint64_t len)>
292-
&outputFunc_()
291+
static std::function<void(const char *msg, const uint64_t len)> &
292+
outputFunc_()
293293
{
294294
static std::function<void(const char *msg, const uint64_t len)>
295295
outputFunc = Logger::defaultOutputFunction;
@@ -300,8 +300,8 @@ class TRANTOR_EXPORT Logger : public NonCopyable
300300
static std::function<void()> flushFunc = Logger::defaultFlushFunction;
301301
return flushFunc;
302302
}
303-
static std::function<void(const char *msg, const uint64_t len)>
304-
&outputFunc_(size_t index)
303+
static std::function<void(const char *msg, const uint64_t len)> &
304+
outputFunc_(size_t index)
305305
{
306306
static std::vector<
307307
std::function<void(const char *msg, const uint64_t len)>>

trantor/utils/crypto/sha3.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void trantor_sha3_keccakf(uint64_t st[25])
3333
#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
3434
uint8_t *v;
3535

36-
// endianess conversion. this is redundant on little-endian targets
36+
// endianness conversion. this is redundant on little-endian targets
3737
for (i = 0; i < 25; i++)
3838
{
3939
v = (uint8_t *)&st[i];
@@ -82,7 +82,7 @@ void trantor_sha3_keccakf(uint64_t st[25])
8282
}
8383

8484
#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
85-
// endianess conversion. this is redundant on little-endian targets
85+
// endianness conversion. this is redundant on little-endian targets
8686
for (i = 0; i < 25; i++)
8787
{
8888
v = (uint8_t *)&st[i];
@@ -193,4 +193,4 @@ void trantor_shake_out(sha3_ctx_t *c, void *out, size_t len)
193193
((uint8_t *)out)[i] = c->st.b[j++];
194194
}
195195
c->pt = j;
196-
}
196+
}

0 commit comments

Comments
 (0)