mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
chunk_equals_ptr added to compare chunks given as pointers.
This commit is contained in:
parent
1726795fa9
commit
68611395dc
@ -250,6 +250,15 @@ static inline bool chunk_equals(chunk_t a, chunk_t b)
|
||||
a.len == b.len && memeq(a.ptr, b.ptr, a.len);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare two chunks (given as pointers) for equality (useful as callback),
|
||||
* NULL chunks are never equal.
|
||||
*/
|
||||
static inline bool chunk_equals_ptr(chunk_t *a, chunk_t *b)
|
||||
{
|
||||
return a != NULL && b != NULL && chunk_equals(*a, *b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment a chunk, as it would reprensent a network order integer.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user