From 98ec22d4bee7354c0d9d9a1ead16a40ebb26d70c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 30 May 2019 08:30:29 +0200 Subject: shared: add nmtst_get_rand_uint() helper --- shared/nm-utils/nm-test-utils.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h index 9f7a000497..07cda38856 100644 --- a/shared/nm-utils/nm-test-utils.h +++ b/shared/nm-utils/nm-test-utils.h @@ -863,6 +863,13 @@ nmtst_get_rand_uint32 (void) return g_rand_int (nmtst_get_rand ()); } +static inline guint +nmtst_get_rand_uint (void) +{ + G_STATIC_ASSERT_EXPR (sizeof (guint32) == sizeof (guint)); + return nmtst_get_rand_uint32 (); +} + static inline gboolean nmtst_get_rand_bool (void) { -- cgit v1.2.1