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

index 8682f105e3bbc4aafbfe78ea723797bbe050a056..676d41462772736ea823f9837783d228e3d299d2 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.024448 seconds and 4 git commands to generate.