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: Ia240047e2472bccb2bb039ff71bea20a7a602ec4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/subprojects/ncsid/src/ncsi_sockio.h b/subprojects/ncsid/src/ncsi_sockio.h
index b41cbc4..09c610a 100644
--- a/subprojects/ncsid/src/ncsi_sockio.h
+++ b/subprojects/ncsid/src/ncsi_sockio.h
@@ -32,8 +32,7 @@
   public:
     SockIO() = default;
 
-    explicit SockIO(int sockfd) : net::SockIO(sockfd)
-    {}
+    explicit SockIO(int sockfd) : net::SockIO(sockfd) {}
 
     // This function creates a raw socket and initializes sockfd_.
     // If the default constructor for this class was used,
diff --git a/subprojects/ncsid/src/net_config.cpp b/subprojects/ncsid/src/net_config.cpp
index 5b5ae93..e9b390b 100644
--- a/subprojects/ncsid/src/net_config.cpp
+++ b/subprojects/ncsid/src/net_config.cpp
@@ -50,9 +50,9 @@
 
 int parse_mac(const std::string& mac_addr, mac_addr_t* mac)
 {
-    int ret =
-        sscanf(mac_addr.c_str(), MAC_FORMAT, mac->octet, mac->octet + 1,
-               mac->octet + 2, mac->octet + 3, mac->octet + 4, mac->octet + 5);
+    int ret = sscanf(mac_addr.c_str(), MAC_FORMAT, mac->octet, mac->octet + 1,
+                     mac->octet + 2, mac->octet + 3, mac->octet + 4,
+                     mac->octet + 5);
 
     return ret < 6 ? -1 : 0;
 }
diff --git a/subprojects/ncsid/src/net_iface.h b/subprojects/ncsid/src/net_iface.h
index d7c2b4c..d44f23c 100644
--- a/subprojects/ncsid/src/net_iface.h
+++ b/subprojects/ncsid/src/net_iface.h
@@ -87,8 +87,7 @@
 class IFace : public IFaceBase
 {
   public:
-    explicit IFace(const std::string& name) : IFaceBase(name)
-    {}
+    explicit IFace(const std::string& name) : IFaceBase(name) {}
 
     /** @brief Bind given socket to this interface. Similar to bind
      *     syscall, except that it fills in sll_ifindex field
diff --git a/subprojects/ncsid/src/net_sockio.h b/subprojects/ncsid/src/net_sockio.h
index 551be85..9adb9a8 100644
--- a/subprojects/ncsid/src/net_sockio.h
+++ b/subprojects/ncsid/src/net_sockio.h
@@ -25,8 +25,7 @@
 {
   public:
     SockIO() = default;
-    explicit SockIO(int sockfd) : sockfd_{sockfd}
-    {}
+    explicit SockIO(int sockfd) : sockfd_{sockfd} {}
     virtual ~SockIO();
 
     int get_sockfd() const
diff --git a/subprojects/ncsid/test/ncsi_test.cpp b/subprojects/ncsid/test/ncsi_test.cpp
index 39b8378..b613647 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/net_iface_mock.h b/subprojects/ncsid/test/net_iface_mock.h
index bcf9209..0ccf5bf 100644
--- a/subprojects/ncsid/test/net_iface_mock.h
+++ b/subprojects/ncsid/test/net_iface_mock.h
@@ -26,10 +26,8 @@
 class IFace : public net::IFaceBase
 {
   public:
-    IFace() : net::IFaceBase("mock0")
-    {}
-    explicit IFace(const std::string& name) : net::IFaceBase(name)
-    {}
+    IFace() : net::IFaceBase("mock0") {}
+    explicit IFace(const std::string& name) : net::IFaceBase(name) {}
     int bind_sock(int sockfd, struct sockaddr_ll* saddr) const override;
 
     mutable std::vector<int> bound_socks;
diff --git a/subprojects/ncsid/test/nic_mock.cpp b/subprojects/ncsid/test/nic_mock.cpp
index 01b154b..c435ffa 100644
--- a/subprojects/ncsid/test/nic_mock.cpp
+++ b/subprojects/ncsid/test/nic_mock.cpp
@@ -72,8 +72,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;
@@ -100,8 +100,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
     {
@@ -185,8 +185,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:
         {
@@ -273,13 +273,11 @@
 
 void NIC::set_hostless(bool is_hostless)
 {
-    auto set_flag_op = [](uint8_t lhs, uint8_t rhs) -> auto
-    {
+    auto set_flag_op = [](uint8_t lhs, uint8_t rhs) -> auto {
         return lhs | rhs;
     };
 
-    auto clear_flag_op = [](uint8_t lhs, uint8_t rhs) -> auto
-    {
+    auto clear_flag_op = [](uint8_t lhs, uint8_t rhs) -> auto {
         return lhs & ~rhs;
     };
 
@@ -287,14 +285,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);
     }
 }