From: Jérémie Galarneau Date: Wed, 12 Dec 2018 20:11:29 +0000 (-0500) Subject: Use uuid_to_str() when formatting metadata X-Git-Tag: v2.11.0-rc3~151 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d75227cd0892f25242b5596c78c568f590c9b767;p=lttng-tools.git Use uuid_to_str() when formatting metadata Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/ust-metadata.c b/src/bin/lttng-sessiond/ust-metadata.c index 3256c2cb7..a657f7c5d 100644 --- a/src/bin/lttng-sessiond/ust-metadata.c +++ b/src/bin/lttng-sessiond/ust-metadata.c @@ -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,