Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Aug 2017 10:58:02 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r322232 - vendor-sys/illumos/dist/uts/common/fs/zfs/sys
Message-ID:  <201708081058.v78Aw2Sr034904@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue Aug  8 10:58:01 2017
New Revision: 322232
URL: https://svnweb.freebsd.org/changeset/base/322232

Log:
  8426 mark immutable buffer arguments as such in abd.h
  
  illumos/illumos-gate@9b195260e22529ac0e2580faaf89402420589c1c
  https://github.com/illumos/illumos-gate/commit/9b195260e22529ac0e2580faaf89402420589c1c
  
  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>

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h	Tue Aug  8 10:55:42 2017	(r322231)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h	Tue Aug  8 10:58:01 2017	(r322232)
@@ -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));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708081058.v78Aw2Sr034904>