Use uuid_to_str() when formatting metadata
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 12 Dec 2018 20:11:29 +0000 (15:11 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 20:37:41 +0000 (16:37 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-metadata.c

index 3256c2cb74a26569dada62cdd6fc2d705f2e5766..a657f7c5d3d26b62472e66ecef3f188e987ee121 100644 (file)
@@ -877,7 +877,6 @@ int ust_metadata_session_statedump(struct ust_registry_session *session,
                uint32_t major,
                uint32_t minor)
 {
-       unsigned char *uuid_c;
        char uuid_s[UUID_STR_LEN],
                clock_uuid_s[UUID_STR_LEN];
        int ret = 0;
@@ -885,14 +884,7 @@ int ust_metadata_session_statedump(struct ust_registry_session *session,
 
        assert(session);
 
-       uuid_c = session->uuid;
-
-       snprintf(uuid_s, sizeof(uuid_s),
-               "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
-               uuid_c[0], uuid_c[1], uuid_c[2], uuid_c[3],
-               uuid_c[4], uuid_c[5], uuid_c[6], uuid_c[7],
-               uuid_c[8], uuid_c[9], uuid_c[10], uuid_c[11],
-               uuid_c[12], uuid_c[13], uuid_c[14], uuid_c[15]);
+       lttng_uuid_to_str(session->uuid, uuid_s);
 
        /* For crash ABI */
        ret = lttng_metadata_printf(session,
This page took 0.026349 seconds and 4 git commands to generate.