Skip to content

Commit b1e9327

Browse files
authored
Cleanup - some more clang-tidy recommendation. (#12172)
* Cleanup - some more clang-tidy recommendation.
1 parent 66d92f7 commit b1e9327

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/iocore/net/P_UnixNet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ check_transient_accept_error(int res)
198198
last_transient_accept_error = t;
199199
Warning("accept thread received transient error: errno = %d", -res);
200200
#if defined(__linux__)
201-
if (res == -ENOBUFS || res == -ENFILE)
201+
if (res == -ENOBUFS || res == -ENFILE) {
202202
Warning("errno : %d consider a memory upgrade", -res);
203+
}
203204
#endif
204205
}
205206
}

src/iocore/net/SSLUtils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ asn1_strdup(ASN1_STRING *s)
10151015
ink_assert(ASN1_STRING_type(s) == V_ASN1_IA5STRING || ASN1_STRING_type(s) == V_ASN1_UTF8STRING ||
10161016
ASN1_STRING_type(s) == V_ASN1_PRINTABLESTRING || ASN1_STRING_type(s) == V_ASN1_T61STRING);
10171017

1018-
return ats_strndup((const char *)ASN1_STRING_get0_data(s), ASN1_STRING_length(s));
1018+
return ats_strndup(reinterpret_cast<const char *>(ASN1_STRING_get0_data(s)), ASN1_STRING_length(s));
10191019
}
10201020

10211021
// This callback function is executed while OpenSSL processes the SSL

src/proxy/http/remap/unit-tests/test_PluginDso.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,20 @@ class PluginDsoUnitTest : public PluginDso
6868
{
6969
}
7070

71-
virtual void
71+
void
7272
indicatePreReload() override
7373
{
7474
}
75-
virtual void
75+
void
7676
indicatePostReload(TSRemapReloadStatus /* reloadStatus ATS_UNUSED */) override
7777
{
7878
}
79-
virtual bool
79+
bool
8080
init(std::string & /* error ATS_UNUSED */) override
8181
{
8282
return true;
8383
}
84-
virtual void
84+
void
8585
done() override
8686
{
8787
}

src/traffic_server/traffic_server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ init_memory_tracker(const char *config_var, RecDataT /* type ATS_UNUSED */, RecD
595595
void
596596
proxy_signal_handler(int signo, siginfo_t *info, void *ctx)
597597
{
598-
if ((unsigned)signo < countof(signal_received)) {
598+
if (static_cast<unsigned>(signo) < countof(signal_received)) {
599599
signal_received[signo] = true;
600600
}
601601

0 commit comments

Comments
 (0)