mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 20:38:10 +02:00
shared: add nm_gbytes_equal0() helper
Like g_bytes_equal(), except that it accepts %NULL arguments.
This commit is contained in:
parent
4c4c85eab0
commit
c5c0ffdfd0
1 changed files with 6 additions and 0 deletions
|
|
@ -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,
|
gboolean nm_utils_gbytes_equal_mem (GBytes *bytes,
|
||||||
gconstpointer mem_data,
|
gconstpointer mem_data,
|
||||||
gsize mem_len);
|
gsize mem_len);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue