summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2020-01-09 10:39:55 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2020-01-17 10:02:01 +0000
commitfa434739a0fff3c642233cdca6ad00e9e89cbe61 (patch)
tree040b238ec984ae7cb5029de374d0e81f54fcdb36 /examples
parent7b9645a7d127a374b8d1c83fdf9789706dbab2c9 (diff)
downloadlibvirt-fa434739a0fff3c642233cdca6ad00e9e89cbe61.tar.gz
src: replace verify(expr) with G_STATIC_ASSERT(expr)
G_STATIC_ASSERT() is a drop-in functional equivalent of the GNULIB verify() macro. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/c/misc/event-test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/c/misc/event-test.c b/examples/c/misc/event-test.c
index ae282a5027..7e48cecc92 100644
--- a/examples/c/misc/event-test.c
+++ b/examples/c/misc/event-test.c
@@ -16,9 +16,9 @@
#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
&& (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
&& !defined __cplusplus)
-# define verify(cond) _Static_assert(cond, "verify (" #cond ")")
+# define G_STATIC_ASSERT(cond) _Static_assert(cond, "verify (" #cond ")")
#else
-# define verify(cond)
+# define G_STATIC_ASSERT(cond)
#endif
#ifndef G_GNUC_UNUSED
@@ -1138,10 +1138,10 @@ struct secretEventData secretEvents[] = {
};
/* make sure that the events are kept in sync */
-verify(G_N_ELEMENTS(domainEvents) == VIR_DOMAIN_EVENT_ID_LAST);
-verify(G_N_ELEMENTS(storagePoolEvents) == VIR_STORAGE_POOL_EVENT_ID_LAST);
-verify(G_N_ELEMENTS(nodeDeviceEvents) == VIR_NODE_DEVICE_EVENT_ID_LAST);
-verify(G_N_ELEMENTS(secretEvents) == VIR_SECRET_EVENT_ID_LAST);
+G_STATIC_ASSERT(G_N_ELEMENTS(domainEvents) == VIR_DOMAIN_EVENT_ID_LAST);
+G_STATIC_ASSERT(G_N_ELEMENTS(storagePoolEvents) == VIR_STORAGE_POOL_EVENT_ID_LAST);
+G_STATIC_ASSERT(G_N_ELEMENTS(nodeDeviceEvents) == VIR_NODE_DEVICE_EVENT_ID_LAST);
+G_STATIC_ASSERT(G_N_ELEMENTS(secretEvents) == VIR_SECRET_EVENT_ID_LAST);
int
main(int argc, char **argv)