Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/experimental/memcache/tsmemcache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ MC::add_binary_header(uint16_t err, uint8_t hdr_len, uint16_t key_len, uint32_t
int
MC::write_binary_error(protocol_binary_response_status err, int swallow)
{
const char *errstr = "Unknown error";
const char *errstr{nullptr};
switch (err) {
case PROTOCOL_BINARY_RESPONSE_ENOMEM:
errstr = "Out of memory";
Expand Down
10 changes: 4 additions & 6 deletions src/iocore/cache/CacheProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@
#include <cstring>
#include <filesystem>
#include <fstream>
#include <numeric>
#include <string>
#include <system_error>
#include <unordered_set>
#include <vector>

static void CachePeriodicMetricsUpdate();
static int64_t cache_bytes_used(int index);
Expand Down Expand Up @@ -976,10 +978,8 @@ cplist_reconfigure()
// else the size is greater...
/* search the cp_list */

int *sorted_vols = new int[gndisks];
for (int i = 0; i < gndisks; i++) {
sorted_vols[i] = i;
}
std::vector<int> sorted_vols(gndisks);
std::iota(sorted_vols.begin(), sorted_vols.end(), 0);
for (int i = 0; i < gndisks - 1; i++) {
int smallest = sorted_vols[i];
int smallest_ndx = i;
Expand Down Expand Up @@ -1039,8 +1039,6 @@ cplist_reconfigure()
size_to_alloc = size_in_blocks - cp->size;
}

delete[] sorted_vols;

if (size_to_alloc) {
if (create_volume(volume_number, size_to_alloc, cp->scheme, cp)) {
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/iocore/net/UnixNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ UnixNetVConnection::net_write_io(NetHandler *nh)
nh->write_ready_list.remove(this);
}

int err, ret;
int err{0}, ret{0};

if (this->get_context() == NET_VCONNECTION_OUT) {
ret = this->sslStartHandShake(SSL_EVENT_CLIENT, err);
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/http/HttpTransact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7528,7 +7528,7 @@ void
HttpTransact::handle_server_down(State *s)
{
const char *reason = nullptr;
const char *body_type = "UNKNOWN";
const char *body_type = nullptr;
HTTPStatus status = HTTP_STATUS_BAD_GATEWAY;

////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions src/tscore/ink_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ ink_freelist_init(InkFreeList **fl, const char *name, uint32_t type_size, uint32
}
Dbg(dbg_ctl_freelist_init, "<%s> Alignment request/actual (%" PRIu32 "/%" PRIu32 ")", name, alignment, f->alignment);
Dbg(dbg_ctl_freelist_init, "<%s> Type Size request/actual (%" PRIu32 "/%" PRIu32 ")", name, type_size, f->type_size);
ink_assert(f->type_size != 0);
if (f->use_hugepages) {
f->chunk_size = INK_ALIGN(chunk_size * f->type_size, ats_hugepage_size()) / f->type_size;
} else {
Expand Down