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/nemora-postd/src/default_addresses.h b/subprojects/nemora-postd/src/default_addresses.h
index 2e1321e..85ed3bf 100644
--- a/subprojects/nemora-postd/src/default_addresses.h
+++ b/subprojects/nemora-postd/src/default_addresses.h
@@ -43,46 +43,26 @@
#endif
// 2001:4860:f802::c5
-#define DEFAULT_ADDRESSES_TARGET_IP6 \
- { \
- 0x20014860, 0xf8020000, 0, 0xc5 \
- }
+#define DEFAULT_ADDRESSES_TARGET_IP6 {0x20014860, 0xf8020000, 0, 0xc5}
#ifdef NETWORK_UNITTEST
#define DEFAULT_ADDRESSES_GATEWAY ((172 << 24) | (23 << 16) | (130 << 8) | 190)
#define DEFAULT_ADDRESSES_NETMASK ((255 << 24) | (255 << 16) | (255 << 8) | 192)
#define DEFAULT_ADDRESSES_LOCAL_IP ((172 << 24) | (23 << 16) | (130 << 8) | 141)
-#define DEFAULT_ADDRESSES_MAC \
- { \
- 0x00, 0x1a, 0x11, 0x30, 0xc9, 0x6f \
- }
-#define DEFAULT_ADDRESSES_GATEWAY6 \
- { \
- 0, 0, 0, 0 \
- }
-#define DEFAULT_ADDRESSES_GATEWAY6_MAC \
- { \
- 0, 0, 0, 0, 0, 0 \
- }
+#define DEFAULT_ADDRESSES_MAC {0x00, 0x1a, 0x11, 0x30, 0xc9, 0x6f}
+#define DEFAULT_ADDRESSES_GATEWAY6 {0, 0, 0, 0}
+#define DEFAULT_ADDRESSES_GATEWAY6_MAC {0, 0, 0, 0, 0, 0}
#else
#define DEFAULT_ADDRESSES_GATEWAY 0
#define DEFAULT_ADDRESSES_NETMASK 0
#define DEFAULT_ADDRESSES_LOCAL_IP 0
-#define DEFAULT_ADDRESSES_MAC \
- { \
- 0, 0, 0, 0, 0, 0 \
- }
+#define DEFAULT_ADDRESSES_MAC {0, 0, 0, 0, 0, 0}
// fe80::1 -- as of 2016-10-13 this is guaranteed to be the GW in prod.
#define DEFAULT_ADDRESSES_GATEWAY6 \
- { \
- 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 \
- }
+ {0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}
// 02:32:00:00:00:00 -- as of 2016-10-13 this is guaranteed to be the
// GW MAC addr in prod.
-#define DEFAULT_ADDRESSES_GATEWAY6_MAC \
- { \
- 0x02, 0x32, 0, 0, 0, 0 \
- }
+#define DEFAULT_ADDRESSES_GATEWAY6_MAC {0x02, 0x32, 0, 0, 0, 0}
#endif
#endif // PLATFORMS_NEMORA_PORTABLE_DEFAULT_ADDRESSES_H_
diff --git a/subprojects/nemora-postd/src/nemora.cpp b/subprojects/nemora-postd/src/nemora.cpp
index 403d766..d051241 100644
--- a/subprojects/nemora-postd/src/nemora.cpp
+++ b/subprojects/nemora-postd/src/nemora.cpp
@@ -102,8 +102,8 @@
Nemora::Nemora(const std::string& iface_name, const in_addr ipv4,
const in6_addr ipv6) :
- socketManager_(),
- hostManager_(), iface_path_{std::string(IFACE_ROOT) + iface_name}
+ socketManager_(), hostManager_(),
+ iface_path_{std::string(IFACE_ROOT) + iface_name}
{
InitEventData();
event_data_.destination.sin_addr = ipv4;