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:
avg 2017-08-08 10:58:01 +00:00
parent 93a0c2797e
commit a89e51876b

View File

@ -113,7 +113,7 @@ abd_copy(abd_t *dabd, abd_t *sabd, size_t size)
} }
inline void 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); 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 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)); return (abd_cmp_buf_off(abd, buf, 0, size));
} }