From: Julien Desfossez Date: Fri, 10 Aug 2012 19:45:48 +0000 (-0400) Subject: fix warnings X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=66bc340f7f32462fb4d28226cb026bb2eef9e949;p=lttngtop.git fix warnings Signed-off-by: Julien Desfossez --- diff --git a/src/lttngtop.c b/src/lttngtop.c index 8682f10..676d414 100644 --- a/src/lttngtop.c +++ b/src/lttngtop.c @@ -849,7 +849,7 @@ void *live_consume() fprintf(stderr,"OPENING TRACE\n"); if (access("/tmp/livesession/kernel/metadata", F_OK) != 0) { fprintf(stderr,"NO METADATA FILE, SKIPPING\n"); - return; + return NULL; } metadata_ready = 1; metadata_fp = fopen("/tmp/livesession/kernel/metadata", "r"); @@ -859,6 +859,10 @@ void *live_consume() bt_ctx = bt_context_create(); ret = bt_context_add_trace(bt_ctx, NULL, "ctf", lttngtop_ctf_packet_seek, &mmap_list, metadata_fp); + if (ret < 0) { + printf("Error adding trace\n"); + return NULL; + } trace_opened = 1; } iter_trace(bt_ctx); @@ -999,7 +1003,7 @@ void *setup_live_tracing() //init_lttngtop(); end: - return ret; + return NULL; } int main(int argc, char **argv)