fix warnings
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 10 Aug 2012 19:45:48 +0000 (15:45 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Sat, 19 Oct 2013 16:02:38 +0000 (12:02 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
src/lttngtop.c

index fd23e74da416c746cf437586ecb275d3c0628a2d..6f4fd339ea4d36a94916c9fd22178e3dbfe061a4 100644 (file)
@@ -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)
This page took 0.023598 seconds and 4 git commands to generate.