mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
Merge branch '1897-assert-cmpmem-nonnull' into 'master'
gtestutils: Add additional non-NULL check in g_assert_cmpmem() Closes #1897 See merge request GNOME/glib!1191
This commit is contained in:
commit
434dbf0823
@ -89,7 +89,7 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
|
||||
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", \
|
||||
(long double) __l1, "==", (long double) __l2, 'i'); \
|
||||
else if (__l1 != 0 && memcmp (__m1, __m2, __l1) != 0) \
|
||||
else if (__l1 != 0 && __m2 != NULL && memcmp (__m1, __m2, __l1) != 0) \
|
||||
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
"assertion failed (" #m1 " == " #m2 ")"); \
|
||||
} G_STMT_END
|
||||
|
Loading…
x
Reference in New Issue
Block a user