clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I07b444d4ae00b0fce52a846f2bff2e6b99fb971c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/fru_utils.cpp b/src/fru_utils.cpp
index b168705..808179f 100644
--- a/src/fru_utils.cpp
+++ b/src/fru_utils.cpp
@@ -194,7 +194,6 @@
bool verifyOffset(const std::vector<uint8_t>& fruBytes, fruAreas currentArea,
uint8_t len)
{
-
unsigned int fruBytesSize = fruBytes.size();
// check if Fru data has at least 8 byte header
@@ -276,15 +275,14 @@
for (fruAreas area = fruAreas::fruAreaChassis;
area <= fruAreas::fruAreaProduct; ++area)
{
-
size_t offset = *(fruBytes.begin() + getHeaderAreaFieldOffset(area));
if (offset == 0)
{
continue;
}
offset *= fruBlockSize;
- std::vector<uint8_t>::const_iterator fruBytesIter =
- fruBytes.begin() + offset;
+ std::vector<uint8_t>::const_iterator fruBytesIter = fruBytes.begin() +
+ offset;
if (fruBytesIter + fruBlockSize >= fruBytes.end())
{
std::cerr << "Not enough data to parse \n";
@@ -394,8 +392,8 @@
DecodeState state = DecodeState::ok;
do
{
- auto res =
- decodeFRUData(fruBytesIter, fruBytesIterEndArea, isLangEng);
+ auto res = decodeFRUData(fruBytesIter, fruBytesIterEndArea,
+ isLangEng);
state = res.first;
std::string value = res.second;
std::string name;
@@ -951,16 +949,14 @@
std::shared_ptr<sdbusplus::asio::dbus_interface>>& dbusInterfaceMap,
std::string& productName)
{
-
int highest = -1;
bool found = false;
- for (auto const& busIface : dbusInterfaceMap)
+ for (const auto& busIface : dbusInterfaceMap)
{
std::string path = busIface.second->get_object_path();
if (std::regex_match(path, std::regex(productName + "(_\\d+|)$")))
{
-
// Check if the match named has extra information.
found = true;
std::smatch baseMatch;