Update clang format file
Updated clang format file from docs repo to match with clang-format 10.
Also fixed some of files as per new clang format.
Change-Id: I36277447722e5c52dac49e0da745b0b0e870d298
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 60afb13..be03ca3 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -182,7 +182,8 @@
switch (static_cast<LanParam>(lan_param))
{
- case LanParam::IP: {
+ case LanParam::IP:
+ {
auto ethIP = ethdevice + "/" + ipmi::network::IPV4_TYPE;
std::string ipaddress;
auto ipObjectInfo = ipmi::network::getIPObject(
@@ -198,7 +199,8 @@
}
break;
- case LanParam::IPV6: {
+ case LanParam::IPV6:
+ {
auto ethIP = ethdevice + "/" + ipmi::network::IPV6_TYPE;
std::string ipaddress;
auto ipObjectInfo = ipmi::network::getIPObject(
@@ -214,7 +216,8 @@
}
break;
- case LanParam::MAC: {
+ case LanParam::MAC:
+ {
std::string macAddress;
auto macObjectInfo =
ipmi::getDbusObject(bus, ipmi::network::MAC_INTERFACE,
diff --git a/src/selcommands.cpp b/src/selcommands.cpp
index e305c44..127a593 100644
--- a/src/selcommands.cpp
+++ b/src/selcommands.cpp
@@ -362,13 +362,15 @@
case 0xA:
errLog = "Bus Fatal" + tmp1.str();
break;
- case 0xD: {
+ case 0xD:
+ {
uint32_t venId = (uint32_t)data[1] << 8 | (uint32_t)data[2];
tmp2 << "Vendor ID: 0x" << std::setw(4) << venId;
errLog = tmp2.str();
}
break;
- case 0xE: {
+ case 0xE:
+ {
uint32_t devId = (uint32_t)data[1] << 8 | (uint32_t)data[2];
tmp2 << "Device ID: 0x" << std::setw(4) << devId;
errLog = tmp2.str();
@@ -479,7 +481,8 @@
switch ((data[1] & 0xC) >> 2)
{
- case 0x0: {
+ case 0x0:
+ {
/* All Info Valid */
uint8_t chnNum = (data[2] & 0x1C) >> 2;
diff --git a/src/usb-dbg.cpp b/src/usb-dbg.cpp
index 7d5f74e..2588f81 100644
--- a/src/usb-dbg.cpp
+++ b/src/usb-dbg.cpp
@@ -105,8 +105,7 @@
uint8_t overwrite;
time_t mtime;
frame() : buf(NULL), pages(0), mtime(0)
- {
- }
+ {}
int init(size_t size);
int append(const char* string, int indent);
int insert(const char* string, int indent);