Port: cast result of be64toh() to uint64_t for print format
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 11 Jul 2017 18:48:40 +0000 (14:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 19 Jul 2017 19:11:39 +0000 (15:11 -0400)
The type of the return value of be64toh() can vary from unsigned long to
unsigned long long across platforms, cast it to the longer type before
printing.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/lttng-live/viewer-connection.c

index 13b882774722e470f525105367fe656de5ecc176..2955b938442a56096aa4a5ef2e56ee9f832c86ba 100644 (file)
@@ -195,7 +195,7 @@ static int lttng_live_handshake(struct bt_live_viewer_connection *viewer_connect
        assert(ret_len == sizeof(connect));
 
        BT_LOGD("Received viewer session ID : %" PRIu64,
-                       be64toh(connect.viewer_session_id));
+                       (uint64_t) be64toh(connect.viewer_session_id));
        BT_LOGD("Relayd version : %u.%u", be32toh(connect.major),
                        be32toh(connect.minor));
 
This page took 0.025557 seconds and 5 git commands to generate.