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

Gleb Smirnoff glebius at FreeBSD.org
Wed Mar 16 20:34:49 UTC 2016


On Wed, Mar 16, 2016 at 01:32:41PM -0700, Gleb Smirnoff wrote:
T> H> +.Sh EXAMPLES
T> H> +The following example creates a static counter array exported to
T> H> +userspace through a sysctl:
T> H> +.Bd -literal -offset indent
T> H> +#define MY_SIZE 8
T> H> +static counter_u64_t array[MY_SIZE];
T> H> +SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_array, CTLFLAG_RW,
T> H> +    &array[0], MY_SIZE, "Test counter array");
T> 
T> I always wondered what is stylistically better: array or &array[0]? I
T> usually prefer the former.

And now your assertion forces to do the latter.

-- 
Totus tuus, Glebius.


More information about the svn-src-head mailing list