summaryrefslogtreecommitdiff
path: root/redfish-core/lib/ethernet.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-07 00:12:53 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 22:00:37 +0300
commit543f44000a992870ff76e76888dd589a3a31ed4e (patch)
tree9e4363d871da1643f25856665585bb8c6e251aa3 /redfish-core/lib/ethernet.hpp
parentd63c72ea488b808f5574e61585334a3ffb90c258 (diff)
downloadbmcweb-543f44000a992870ff76e76888dd589a3a31ed4e.tar.xz
Enable init checker
clang-tidy added cppcoreguidelines-init-variables as a check, which is something we already enforce to some extent, but getting CI to enforce it will help reviews move faster. Tested: Code compiles. Noop changes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7e10950de617b1d3262265572b1703f2e60b69d0
Diffstat (limited to 'redfish-core/lib/ethernet.hpp')
-rw-r--r--redfish-core/lib/ethernet.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 87351782de..ee8d2cd5b5 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -635,9 +635,9 @@ inline bool ipv4VerifyIpAndGetBitcount(const std::string& ip,
*bits = 0;
}
- char* endPtr;
+ char* endPtr = nullptr;
long previousValue = 255;
- bool firstZeroInByteHit;
+ bool firstZeroInByteHit = false;
for (const std::string& byte : bytesInMask)
{
if (byte.empty())
@@ -1581,8 +1581,8 @@ inline void handleIPv6StaticAddressesPatch(
return;
}
- const std::string* addr;
- uint8_t prefix;
+ const std::string* addr = nullptr;
+ uint8_t prefix = 0;
// Find the address and prefixLength values. Any values that are
// not explicitly provided are assumed to be unmodified from the