shared: add nm_gbytes_equal0() helper

Like g_bytes_equal(), except that it accepts %NULL arguments.
This commit is contained in:
Thomas Haller 2018-09-01 18:07:57 +02:00
parent 4c4c85eab0
commit c5c0ffdfd0

View file

@ -221,6 +221,12 @@ nm_utils_is_separator (const char c)
/*****************************************************************************/
static inline gboolean
nm_gbytes_equal0 (GBytes *a, GBytes *b)
{
return a == b || (a && b && g_bytes_equal (a, b));
}
gboolean nm_utils_gbytes_equal_mem (GBytes *bytes,
gconstpointer mem_data,
gsize mem_len);