From: Julien Desfossez Date: Fri, 10 Aug 2012 19:45:48 +0000 (-0400) Subject: fix warnings X-Git-Tag: v0.3~115 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=62e026c68231e6d20c75d2a4e3df5ec6f2fcf9e9;p=lttngtop.git fix warnings Signed-off-by: Julien Desfossez --- diff --git a/src/lttngtop.c b/src/lttngtop.c index fd23e74..6f4fd33 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)