Fix a few other minor issues reported by Coverity

This commit is contained in:
Tim Wojtulewicz 2025-07-21 15:27:32 -07:00
parent d22810e476
commit 64bca5ce4c
3 changed files with 2 additions and 4 deletions

View file

@ -68,7 +68,6 @@ void RandTest::add(const void* buf, int bufl) {
scct2 = scct2 + oc;
scct3 = scct3 + (oc * oc);
scclast = oc;
oc <<= 1;
}
}

View file

@ -35,7 +35,7 @@ public:
ScriptProfileStats& operator=(ScriptProfileStats&&) = default;
ScriptProfileStats& operator=(const ScriptProfileStats&) = default;
const auto Name() const { return name; }
const auto& Name() const { return name; }
// Number of instances included in an aggregate (like for "all BiFs").
// This is 1 for non-aggregates.

View file

@ -554,10 +554,9 @@ void Contents_RPC::DeliverStream(int len, const u_char* data, bool orig) {
// know yet how much we expect, so we set expected to
// 0.
msg_buf.Init(MAX_RPC_LEN, 0);
last_frag = false;
state = WAIT_FOR_MARKER;
start_time = run_state::network_time;
// no break. fall through
[[fallthrough]];
case WAIT_FOR_MARKER: {
bool got_marker = marker_buf.ConsumeChunk(data, len);