Date: Mon, 14 Mar 2016 20:34:30 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296871 - head/sys/sys Message-ID: <201603142034.u2EKYUHX021056@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Mon Mar 14 20:34:30 2016 New Revision: 296871 URL: https://svnweb.freebsd.org/changeset/base/296871 Log: Revert r296868. The cast is useful to protect against passing incorrect argument type to the macro. Submitted by: rstone Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Mon Mar 14 18:57:09 2016 (r296870) +++ head/sys/sys/sysctl.h Mon Mar 14 20:34:30 2016 (r296871) @@ -640,11 +640,12 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define SYSCTL_ADD_COUNTER_U64(ctx, parent, nbr, name, access, ptr, descr) \ ({ \ + counter_u64_t *__ptr = (ptr); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U64); \ sysctl_add_oid(ctx, parent, nbr, name, \ CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \ - ptr, 0, sysctl_handle_counter_u64, "QU", __DESCR(descr)); \ + __ptr, 0, sysctl_handle_counter_u64, "QU", __DESCR(descr)); \ }) /* Oid for an opaque object. Specified by a pointer and a length. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603142034.u2EKYUHX021056>