MFV r322232: 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>
MFC after: 2 weeks
This commit is contained in:
commit
b9a4f29445
@ -117,7 +117,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);
|
||||
}
|
||||
@ -129,7 +129,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