From: Jérémie Galarneau Date: Tue, 12 Mar 2019 20:53:27 +0000 (-0400) Subject: Add lttng_uuid_copy() util X-Git-Tag: v2.11.0-rc3~133 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7234768630b544b3c49b378138d9e4428341bd40;p=lttng-tools.git Add lttng_uuid_copy() util Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/compat/uuid.c b/src/common/compat/uuid.c index 25dccbb83..72c5c0a0c 100644 --- a/src/common/compat/uuid.c +++ b/src/common/compat/uuid.c @@ -41,3 +41,8 @@ bool lttng_uuid_is_nil(const lttng_uuid uuid) { return memcmp(nil_uuid, uuid, sizeof(lttng_uuid)) == 0; } + +void lttng_uuid_copy(lttng_uuid dst, const lttng_uuid src) +{ + memcpy(dst, src, sizeof(lttng_uuid)); +} diff --git a/src/common/compat/uuid.h b/src/common/compat/uuid.h index ade7ef56d..a283ea42a 100644 --- a/src/common/compat/uuid.h +++ b/src/common/compat/uuid.h @@ -85,4 +85,7 @@ bool lttng_uuid_is_equal(const lttng_uuid a, const lttng_uuid b); LTTNG_HIDDEN bool lttng_uuid_is_nil(const lttng_uuid uuid); +LTTNG_HIDDEN +void lttng_uuid_copy(lttng_uuid dst, const lttng_uuid src); + #endif /* LTTNG_UUID_H */