clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I362352dcb341658501899267c2ff3ad044ed5912
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/subprojects/ncsid/src/ncsi_state_machine.h b/subprojects/ncsid/src/ncsi_state_machine.h
index 07a7b9c..58b202d 100644
--- a/subprojects/ncsid/src/ncsi_state_machine.h
+++ b/subprojects/ncsid/src/ncsi_state_machine.h
@@ -27,10 +27,9 @@
namespace ncsi
{
-typedef ncsi_response_type_t (*ncsi_simple_poll_f)(ncsi_state_t*,
- network_debug_t*,
- ncsi_buf_t*, mac_addr_t*,
- uint32_t, uint16_t);
+typedef ncsi_response_type_t (*ncsi_simple_poll_f)(
+ ncsi_state_t*, network_debug_t*, ncsi_buf_t*, mac_addr_t*, uint32_t,
+ uint16_t);
// This class encapsulates three state machines:
// * L2 -- performs basic NC-SI setup, reads NIC MAC addr
diff --git a/subprojects/ncsid/src/net_config.cpp b/subprojects/ncsid/src/net_config.cpp
index 4e52cc8..e8c00d2 100644
--- a/subprojects/ncsid/src/net_config.cpp
+++ b/subprojects/ncsid/src/net_config.cpp
@@ -76,8 +76,8 @@
bus(sdbusplus::bus::new_default())
{}
-sdbusplus::message_t PhosphorConfig::new_networkd_call(sdbusplus::bus_t* dbus,
- bool get) const
+sdbusplus::message_t
+ PhosphorConfig::new_networkd_call(sdbusplus::bus_t* dbus, bool get) const
{
auto networkd_call =
dbus->new_method_call(NETWORK_SERVICE, iface_path_.c_str(),
diff --git a/subprojects/ncsid/test/ncsi_test.cpp b/subprojects/ncsid/test/ncsi_test.cpp
index b613647..39b8378 100644
--- a/subprojects/ncsid/test/ncsi_test.cpp
+++ b/subprojects/ncsid/test/ncsi_test.cpp
@@ -172,8 +172,8 @@
static constexpr int test_num_states = 9;
// Total number of states in all three state machines.
- static constexpr int total_num_states = l2_num_states + l3l4_num_states +
- test_num_states;
+ static constexpr int total_num_states =
+ l2_num_states + l3l4_num_states + test_num_states;
};
TEST_F(TestNcsi, TestMACAddrPropagation)
diff --git a/subprojects/ncsid/test/nic_mock.cpp b/subprojects/ncsid/test/nic_mock.cpp
index 20f7f56..ce3224c 100644
--- a/subprojects/ncsid/test/nic_mock.cpp
+++ b/subprojects/ncsid/test/nic_mock.cpp
@@ -74,8 +74,8 @@
payload_offset += sizeof(ncsi_oem_extension_header_t);
}
- packet_raw_ = std::vector<uint8_t>(ncsi_buf.data,
- ncsi_buf.data + ncsi_buf.len);
+ packet_raw_ =
+ std::vector<uint8_t>(ncsi_buf.data, ncsi_buf.data + ncsi_buf.len);
// TODO: Verify payload length.
return true;
@@ -102,8 +102,8 @@
simple_commands_.end())
{
// Simple Response
- response_size = ncsi_build_simple_ack(request_buf.data,
- response_buf->data);
+ response_size =
+ ncsi_build_simple_ack(request_buf.data, response_buf->data);
}
else
{
@@ -187,8 +187,8 @@
}
break;
case NCSI_OEM_COMMAND_ECHO:
- response_size = ncsi_build_oem_echo_ack(request_buf.data,
- response_buf->data);
+ response_size =
+ ncsi_build_oem_echo_ack(request_buf.data, response_buf->data);
break;
case NCSI_OEM_COMMAND_GET_FILTER:
{
@@ -287,14 +287,14 @@
if (channel_count_ > 0)
{
- ch0_filter_.flags = flag_op(ch0_filter_.flags,
- NCSI_OEM_FILTER_FLAGS_HOSTLESS);
+ ch0_filter_.flags =
+ flag_op(ch0_filter_.flags, NCSI_OEM_FILTER_FLAGS_HOSTLESS);
}
if (channel_count_ > 1)
{
- ch1_filter_.flags = flag_op(ch1_filter_.flags,
- NCSI_OEM_FILTER_FLAGS_HOSTLESS);
+ ch1_filter_.flags =
+ flag_op(ch1_filter_.flags, NCSI_OEM_FILTER_FLAGS_HOSTLESS);
}
}