Turn a runtime assertion into a compile-time assertion

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
Simon McVittie 2013-04-16 12:14:14 +01:00
parent e8136f0d30
commit 24a9b93021

View file

@ -506,8 +506,7 @@ init_locks (void)
#undef LOCK_ADDR
};
_dbus_assert (_DBUS_N_ELEMENTS (global_locks) ==
_DBUS_N_GLOBAL_LOCKS);
_DBUS_STATIC_ASSERT (_DBUS_N_ELEMENTS (global_locks) == _DBUS_N_GLOBAL_LOCKS);
i = 0;