Fix: reduce scope of kconsumer consumed_pos and produced_pos
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.c
index b1cc03e860a0e9b10d34a5e8f528f3fcb4d90ae5..68dcc02309a452c756838c6947ecdf0e6a76957b 100644 (file)
@@ -118,7 +118,6 @@ int lttng_kconsumer_snapshot_channel(uint64_t key, char *path,
                struct lttng_consumer_local_data *ctx)
 {
        int ret;
-       unsigned long consumed_pos, produced_pos;
        struct lttng_consumer_channel *channel;
        struct lttng_consumer_stream *stream;
 
@@ -143,6 +142,7 @@ int lttng_kconsumer_snapshot_channel(uint64_t key, char *path,
        cds_list_for_each_entry(stream, &channel->streams.head, send_node) {
                /* Are we at a position _before_ the first available packet ? */
                bool before_first_packet = true;
+               unsigned long consumed_pos, produced_pos;
 
                health_code_update();
 
This page took 0.024345 seconds and 4 git commands to generate.