mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-11-05 19:03:31 +00: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,
|
||||
gconstpointer mem_data,
|
||||
gsize mem_len);
|
||||
|
|
Loading…
Reference in a new issue