X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Flttng-live%2Flttng-live-comm.c;h=e339add6e6981a767e403661440c151ec48ba02a;hp=485dabba376cf67351b659edef18726770f6fdb2;hb=6a724a1e8fa7ee107b43198f7ecf5f803ddd977e;hpb=b319430e3071f61a34b1df73327f3f46e7661c0d diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c index 485dabba..e339add6 100644 --- a/formats/lttng-live/lttng-live-comm.c +++ b/formats/lttng-live/lttng-live-comm.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -53,6 +52,7 @@ #include #include +#include #include "lttng-live.h" #include "lttng-viewer-abi.h" @@ -278,8 +278,8 @@ void update_session_list(GPtrArray *session_list, char *hostname, return; relay_session = g_new0(struct lttng_live_relay_session, 1); - relay_session->hostname = strndup(hostname, MAXNAMLEN); - relay_session->name = strndup(session_name, MAXNAMLEN); + relay_session->hostname = bt_strndup(hostname, MAXNAMLEN); + relay_session->name = bt_strndup(session_name, MAXNAMLEN); relay_session->clients = clients; relay_session->streams = streams; relay_session->timer = timer; @@ -1118,7 +1118,7 @@ int handle_seek_position(size_t index, int whence, struct ctf_stream_pos *pos, struct ctf_file_stream *file_stream) { - int ret; + int ret = 0; switch (whence) { case SEEK_CUR: