8426 mark immutable buffer arguments as such in abd.h
illumos/illumos-gate@9b195260e2
9b195260e2
https://www.illumos.org/issues/8426
abd_copy_from_buf and abd_cmp_buf do not modify their void *buf arguments, so
qualify them with const.
abd_copy_from_buf_off and abd_cmp_buf_off already had that type for the
corresponding arguments.
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>
This commit is contained in:
parent
fd6c8b414e
commit
84e46b3cbd
@ -113,7 +113,7 @@ abd_copy(abd_t *dabd, abd_t *sabd, size_t size)
|
||||
}
|
||||
|
||||
inline void
|
||||
abd_copy_from_buf(abd_t *abd, void *buf, size_t size)
|
||||
abd_copy_from_buf(abd_t *abd, const void *buf, size_t size)
|
||||
{
|
||||
abd_copy_from_buf_off(abd, buf, 0, size);
|
||||
}
|
||||
@ -125,7 +125,7 @@ abd_copy_to_buf(void* buf, abd_t *abd, size_t size)
|
||||
}
|
||||
|
||||
inline int
|
||||
abd_cmp_buf(abd_t *abd, void *buf, size_t size)
|
||||
abd_cmp_buf(abd_t *abd, const void *buf, size_t size)
|
||||
{
|
||||
return (abd_cmp_buf_off(abd, buf, 0, size));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user