X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Flttng-live%2Flttng-live-comm.c;h=6541facfea57abd01ec711b2426d2ed0bfd3045a;hp=fdecf31c92eaa70238611a0b138fdcf6baf7b764;hb=259863bd155540ce01b7bdceef3cbc88dff56be1;hpb=5f38bc819a3feece3f0c8cf1155735b090e533c1 diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c index fdecf31c..6541facf 100644 --- a/formats/lttng-live/lttng-live-comm.c +++ b/formats/lttng-live/lttng-live-comm.c @@ -166,7 +166,7 @@ int lttng_live_establish_connection(struct lttng_live_ctx *ctx) } cmd.cmd = htobe32(LTTNG_VIEWER_CONNECT); - cmd.data_size = htobe64(sizeof(connect)); + cmd.data_size = htobe64((uint64_t) sizeof(connect)); cmd.cmd_version = htobe32(0); connect.viewer_session_id = -1ULL; /* will be set on recv */ @@ -307,7 +307,7 @@ int lttng_live_list_sessions(struct lttng_live_ctx *ctx, const char *path) } cmd.cmd = htobe32(LTTNG_VIEWER_LIST_SESSIONS); - cmd.data_size = htobe64(0); + cmd.data_size = htobe64((uint64_t) 0); cmd.cmd_version = htobe32(0); ret_len = lttng_live_send(ctx->control_sock, &cmd, sizeof(cmd)); @@ -432,7 +432,7 @@ int lttng_live_attach_session(struct lttng_live_ctx *ctx, uint64_t id) } cmd.cmd = htobe32(LTTNG_VIEWER_ATTACH_SESSION); - cmd.data_size = htobe64(sizeof(rq)); + cmd.data_size = htobe64((uint64_t) sizeof(rq)); cmd.cmd_version = htobe32(0); memset(&rq, 0, sizeof(rq)); @@ -662,7 +662,7 @@ retry: } cmd.cmd = htobe32(LTTNG_VIEWER_GET_PACKET); - cmd.data_size = htobe64(sizeof(rq)); + cmd.data_size = htobe64((uint64_t) sizeof(rq)); cmd.cmd_version = htobe32(0); memset(&rq, 0, sizeof(rq)); @@ -814,7 +814,7 @@ int get_one_metadata_packet(struct lttng_live_ctx *ctx, rq.stream_id = htobe64(metadata_stream->id); cmd.cmd = htobe32(LTTNG_VIEWER_GET_METADATA); - cmd.data_size = htobe64(sizeof(rq)); + cmd.data_size = htobe64((uint64_t) sizeof(rq)); cmd.cmd_version = htobe32(0); ret_len = lttng_live_send(ctx->control_sock, &cmd, sizeof(cmd)); @@ -989,7 +989,7 @@ int get_next_index(struct lttng_live_ctx *ctx, struct lttng_viewer_index *rp = &viewer_stream->current_index; cmd.cmd = htobe32(LTTNG_VIEWER_GET_NEXT_INDEX); - cmd.data_size = htobe64(sizeof(rq)); + cmd.data_size = htobe64((uint64_t) sizeof(rq)); cmd.cmd_version = htobe32(0); memset(&rq, 0, sizeof(rq)); @@ -1332,7 +1332,7 @@ int lttng_live_create_viewer_session(struct lttng_live_ctx *ctx) } cmd.cmd = htobe32(LTTNG_VIEWER_CREATE_SESSION); - cmd.data_size = htobe64(0); + cmd.data_size = htobe64((uint64_t) 0); cmd.cmd_version = htobe32(0); ret_len = lttng_live_send(ctx->control_sock, &cmd, sizeof(cmd)); @@ -1522,7 +1522,7 @@ int lttng_live_get_new_streams(struct lttng_live_ctx *ctx, uint64_t id) } cmd.cmd = htobe32(LTTNG_VIEWER_GET_NEW_STREAMS); - cmd.data_size = htobe64(sizeof(rq)); + cmd.data_size = htobe64((uint64_t) sizeof(rq)); cmd.cmd_version = htobe32(0); memset(&rq, 0, sizeof(rq));