From: Jérémie Galarneau Date: Tue, 8 Mar 2016 03:35:23 +0000 (-0500) Subject: lttng enable-channel memsets lttng_channel to -1 X-Git-Tag: v2.8.0-rc1~111 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=394ff38e77d4510a4ff806eb187bf739e84561c6;p=lttng-tools.git lttng enable-channel memsets lttng_channel to -1 The lttng enable-channel command uses a global struct lttng_channel which it initializes to contain all "-1". This is a hack used to set tag all attributes as "unset" which has the unfortunate consequence of setting the extended pointer to a non-sensical value. This workaround explicitly sets the extended pointer to NULL, but this command should be refactored so it is no longer necessary. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 673fecfc5..696b8e094 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -380,6 +380,7 @@ static void init_channel_config(void) * those needed to be set by the default values. */ memset(&chan.attr, -1, sizeof(chan.attr)); + chan.attr.extended.ptr = NULL; } /*