summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-07-28 09:09:44 +0200
committerThomas Haller <thaller@redhat.com>2020-07-31 08:53:04 +0200
commit14fa487a60acc7761c818c6f09a38c1593d740ba (patch)
tree7e725f4457b5abd543d1746574a1724876ba2349 /src
parent7eb94b7dccc02d5500b9d87c9bd6c00fb8f2eac9 (diff)
downloadNetworkManager-14fa487a60acc7761c818c6f09a38c1593d740ba.tar.gz
platform: add static assertion to check NMPlatformIP{Address,Route} struct layout
Diffstat (limited to 'src')
-rw-r--r--src/platform/tests/test-platform-general.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platform/tests/test-platform-general.c b/src/platform/tests/test-platform-general.c
index 86ffdbedcf..9a59a7de9f 100644
--- a/src/platform/tests/test-platform-general.c
+++ b/src/platform/tests/test-platform-general.c
@@ -14,6 +14,14 @@
/*****************************************************************************/
+G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPAddress, address_ptr) == G_STRUCT_OFFSET (NMPlatformIP4Address, address));
+G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPAddress, address_ptr) == G_STRUCT_OFFSET (NMPlatformIP6Address, address));
+
+G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPRoute, network_ptr) == G_STRUCT_OFFSET (NMPlatformIP4Route, network));
+G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPRoute, network_ptr) == G_STRUCT_OFFSET (NMPlatformIP6Route, network));
+
+/*****************************************************************************/
+
static void
test_init_linux_platform (void)
{