svn commit: r296933 - in head: share/man/man9 sys/sys

Gleb Smirnoff glebius at FreeBSD.org
Wed Mar 16 20:36:02 UTC 2016


On Wed, Mar 16, 2016 at 08:37:52AM +0000, Hans Petter Selasky wrote:
H> Modified: head/sys/sys/sysctl.h
H> ==============================================================================
H> --- head/sys/sys/sysctl.h	Wed Mar 16 06:42:15 2016	(r296932)
H> +++ head/sys/sys/sysctl.h	Wed Mar 16 08:37:52 2016	(r296933)
H> @@ -654,8 +654,10 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e
H>  	SYSCTL_OID(parent, nbr, name,					\
H>  	    CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access),			\
H>  	    (ptr), (len), sysctl_handle_counter_u64_array, "S", descr);	\
H> -	CTASSERT(((access) & CTLTYPE) == 0 ||				\
H> -	    ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE)
H> +	CTASSERT((((access) & CTLTYPE) == 0 ||				\
H> +	    ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) &&	\
H> +	    sizeof(counter_u64_t) == sizeof(*(ptr)) &&			\
H> +	    sizeof(uint64_t) == sizeof(**(ptr)))

I don't agree with the last line. Does it assert that counter_u64_t is
implemented using uint64_t? That is true, but that is internal detail,
that might be changed in future.

-- 
Totus tuus, Glebius.


More information about the svn-src-all mailing list