src: Remove extra braces if possible
This commit is contained in:
parent
ec5729b1fa
commit
d105619bc3
|
@ -224,10 +224,10 @@ void test_peek_memchunks_append(void) {
|
|||
MemchunkPool16 pool;
|
||||
PeekMemchunks16 pchunks(&pool);
|
||||
|
||||
std::array<uint8_t, 32> b{{
|
||||
std::array<uint8_t, 32> b{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1',
|
||||
}},
|
||||
},
|
||||
d;
|
||||
|
||||
pchunks.append(b.data(), b.size());
|
||||
|
@ -259,10 +259,10 @@ void test_peek_memchunks_disable_peek_drain(void) {
|
|||
MemchunkPool16 pool;
|
||||
PeekMemchunks16 pchunks(&pool);
|
||||
|
||||
std::array<uint8_t, 32> b{{
|
||||
std::array<uint8_t, 32> b{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1',
|
||||
}},
|
||||
},
|
||||
d;
|
||||
|
||||
pchunks.append(b.data(), b.size());
|
||||
|
@ -287,10 +287,10 @@ void test_peek_memchunks_disable_peek_no_drain(void) {
|
|||
MemchunkPool16 pool;
|
||||
PeekMemchunks16 pchunks(&pool);
|
||||
|
||||
std::array<uint8_t, 32> b{{
|
||||
std::array<uint8_t, 32> b{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1',
|
||||
}},
|
||||
},
|
||||
d;
|
||||
|
||||
pchunks.append(b.data(), b.size());
|
||||
|
@ -315,10 +315,10 @@ void test_peek_memchunks_reset(void) {
|
|||
MemchunkPool16 pool;
|
||||
PeekMemchunks16 pchunks(&pool);
|
||||
|
||||
std::array<uint8_t, 32> b{{
|
||||
std::array<uint8_t, 32> b{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '1',
|
||||
}},
|
||||
},
|
||||
d;
|
||||
|
||||
pchunks.append(b.data(), b.size());
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace shrpx {
|
|||
namespace {
|
||||
// List of API endpoints
|
||||
const std::array<APIEndpoint, 2> &apis() {
|
||||
static const auto apis = new std::array<APIEndpoint, 2>{{
|
||||
static const auto apis = new std::array<APIEndpoint, 2>{
|
||||
APIEndpoint{
|
||||
StringRef::from_lit("/api/v1beta1/backendconfig"),
|
||||
true,
|
||||
|
@ -54,7 +54,7 @@ const std::array<APIEndpoint, 2> &apis() {
|
|||
(1 << API_METHOD_GET),
|
||||
&APIDownstreamConnection::handle_configrevision,
|
||||
},
|
||||
}};
|
||||
};
|
||||
|
||||
return *apis;
|
||||
}
|
||||
|
|
|
@ -1319,7 +1319,7 @@ int ClientHandler::proxy_protocol_read() {
|
|||
// NULL character really destroys functions which expects NULL
|
||||
// terminated string. We won't expect it in PROXY protocol line, so
|
||||
// find it here.
|
||||
auto chrs = std::array<char, 2>{{'\n', '\0'}};
|
||||
auto chrs = std::array<char, 2>{'\n', '\0'};
|
||||
|
||||
constexpr size_t MAX_PROXY_LINELEN = 107;
|
||||
|
||||
|
|
|
@ -110,13 +110,13 @@ int signal_set_handler(void (*handler)(int), Signals &&sigs) {
|
|||
} // namespace
|
||||
|
||||
namespace {
|
||||
constexpr auto master_proc_ign_signals = std::array<int, 1>{{SIGPIPE}};
|
||||
constexpr auto master_proc_ign_signals = std::array<int, 1>{SIGPIPE};
|
||||
} // namespace
|
||||
|
||||
namespace {
|
||||
constexpr auto worker_proc_ign_signals =
|
||||
std::array<int, 5>{{REOPEN_LOG_SIGNAL, EXEC_BINARY_SIGNAL,
|
||||
GRACEFUL_SHUTDOWN_SIGNAL, RELOAD_SIGNAL, SIGPIPE}};
|
||||
std::array<int, 5>{REOPEN_LOG_SIGNAL, EXEC_BINARY_SIGNAL,
|
||||
GRACEFUL_SHUTDOWN_SIGNAL, RELOAD_SIGNAL, SIGPIPE};
|
||||
} // namespace
|
||||
|
||||
int shrpx_signal_set_master_proc_ign_handler() {
|
||||
|
|
Loading…
Reference in New Issue