Tests fix: initialize UST extended channel attributes
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 5 May 2017 16:17:17 +0000 (12:17 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 5 May 2017 16:17:17 +0000 (12:17 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/trace-ust.c
tests/unit/test_ust_data.c

index 55ca4fb3c9bfe5fc6b142cc9a5aa51dda4e117c3..314c21e3804b2b35c899da154bd35889e48b4d00 100644 (file)
@@ -356,8 +356,8 @@ struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *chan,
        luc->attr.switch_timer_interval = chan->attr.switch_timer_interval;
        luc->attr.read_timer_interval = chan->attr.read_timer_interval;
        luc->attr.output = (enum lttng_ust_output) chan->attr.output;
-       luc->monitor_timer_interval =
-                       ((struct lttng_channel_extended *) chan->attr.extended.ptr)->monitor_timer_interval;
+       luc->monitor_timer_interval = ((struct lttng_channel_extended *)
+                       chan->attr.extended.ptr)->monitor_timer_interval;
 
        /* Translate to UST output enum */
        switch (luc->attr.output) {
index 86c1e23bf43edceffa0bce237c40fb0772899a8b..43ad3115bcd4ae6a4a52616f4b2deefb89a429ce 100644 (file)
@@ -106,8 +106,11 @@ static void test_create_ust_channel(void)
 {
        struct ltt_ust_channel *uchan;
        struct lttng_channel attr;
+       struct lttng_channel_extended extended;
 
        memset(&attr, 0, sizeof(attr));
+       memset(&extended, 0, sizeof(extended));
+       attr.attr.extended.ptr = &extended;
 
        ok(lttng_strncpy(attr.name, "channel0", sizeof(attr.name)) == 0,
                "Validate channel name length");
This page took 0.026745 seconds and 4 git commands to generate.