Skip to content

Commit 936885d

Browse files
committed
applied linter fixes
Signed-off-by: Jake Jendzurski <jakeski2015@gmail.com>
1 parent 19ddedd commit 936885d

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

src/standalones/s_bmqfuzz/s_bmqfuzz_bmqp_optionsview.fuzz.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Bloomberg Finance L.P.
1+
// Copyright 2026 Bloomberg Finance L.P.
22
// SPDX-License-Identifier: Apache-2.0
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,6 +24,10 @@
2424
#include <bdlbb_pooledblobbufferfactory.h>
2525
#include <bslma_default.h>
2626

27+
#include <cstddef>
28+
#include <cstdint>
29+
#include <vector>
30+
2731
using namespace BloombergLP;
2832

2933
namespace {
@@ -39,7 +43,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
3943

4044
bslma::Allocator* alloc = bslma::Default::allocator();
4145

42-
const int bufferSize = provider.ConsumeIntegralInRange(k_MIN_BUF_SIZE,
46+
const int bufferSize = provider.ConsumeIntegralInRange(k_MIN_BUF_SIZE,
4347
k_MAX_BUF_SIZE);
4448
const uint32_t sizeSelector = provider.ConsumeIntegral<uint32_t>();
4549

@@ -53,24 +57,23 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
5357
static_cast<int>(payload.size()));
5458

5559
const bmqu::BlobPosition optionsAreaPos(0, 0);
56-
const int optionsAreaSize = static_cast<int>(
60+
const int optionsAreaSize = static_cast<int>(
5761
sizeSelector % (static_cast<uint32_t>(blob.length()) + 1));
5862

5963
bmqp::OptionsView view(alloc);
60-
view.reset(&blob, optionsAreaPos, optionsAreaSize);
61-
62-
if (!view.isValid()) {
64+
const int rc = view.reset(&blob, optionsAreaPos, optionsAreaSize);
65+
if (rc != 0) {
6366
return 0;
6467
}
6568

66-
for (bmqp::OptionsView::const_iterator it = view.begin();
67-
it != view.end();
69+
for (bmqp::OptionsView::const_iterator it = view.begin(); it != view.end();
6870
++it) {
6971
(void)*it;
7072
}
7173

72-
const bool hasSubQueueInfos =
73-
view.find(bmqp::OptionType::e_SUB_QUEUE_INFOS) != view.end();
74+
const bool hasSubQueueInfos = view.find(
75+
bmqp::OptionType::e_SUB_QUEUE_INFOS) !=
76+
view.end();
7477
const bool hasSubQueueIdsOld =
7578
view.find(bmqp::OptionType::e_SUB_QUEUE_IDS_OLD) != view.end();
7679

0 commit comments

Comments
 (0)