mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 08:50:22 +01:00
std-aux: add nm_memeq() helper
This commit is contained in:
parent
60404836d8
commit
5c54bad89d
1 changed files with 6 additions and 0 deletions
|
|
@ -498,6 +498,12 @@ nm_memcmp(const void *s1, const void *s2, size_t n)
|
|||
return memcmp(s1, s2, n);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
nm_memeq(const void *s1, const void *s2, size_t len)
|
||||
{
|
||||
return nm_memcmp(s1, s2, len) == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Very similar to g_str_has_prefix() with the obvious meaning.
|
||||
* Differences:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue