]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test-utils-glib: Ensure correct precedence in g_assert_nonnull()
authorSimon McVittie <smcv@collabora.com>
Wed, 2 Mar 2022 13:03:52 +0000 (13:03 +0000)
committerSimon McVittie <smcv@collabora.com>
Thu, 21 Apr 2022 10:02:44 +0000 (11:02 +0100)
It's best-practice to put macro arguments in parentheses so that they
are always treated as a unit.

Signed-off-by: Simon McVittie <smcv@collabora.com>
test/test-utils-glib.h

index c4a2c5436f919e26e824ce4794f0fe77bdcaa937..ee642033e3949c6fa235f5ea726364cb4e80d84e 100644 (file)
@@ -127,7 +127,7 @@ backported_g_steal_pointer (gpointer pointer_to_pointer)
 #endif
 
 #ifndef g_assert_nonnull
-#define g_assert_nonnull(a) g_assert (a != NULL)
+#define g_assert_nonnull(a) g_assert ((a) != NULL)
 #endif
 
 gboolean test_check_tcp_works (void);