From eafef9ebb1eb94515356250010370703b85f38a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 12 Mar 2019 16:53:27 -0400 Subject: [PATCH] Add lttng_uuid_copy() util MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/common/compat/uuid.c | 5 +++++ src/common/compat/uuid.h | 3 +++ 2 files changed, 8 insertions(+) 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 */ -- 2.34.1