shared: add static asserts for size/alignment of NMEtherAddr

This commit is contained in:
Thomas Haller 2020-11-19 20:12:26 +01:00
parent f125d821be
commit ea3b979a42
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -19,6 +19,9 @@
#include "nm-errno.h"
#include "nm-str-buf.h"
G_STATIC_ASSERT(sizeof(NMEtherAddr) == 6);
G_STATIC_ASSERT(_nm_alignof(NMEtherAddr) == 1);
G_STATIC_ASSERT(sizeof(NMUtilsNamedEntry) == sizeof(const char *));
G_STATIC_ASSERT(G_STRUCT_OFFSET(NMUtilsNamedValue, value_ptr) == sizeof(const char *));