From 072bf227a76ff0683aa4a32255ce89db2107829e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 30 Sep 2014 06:32:36 +0000 Subject: lib: Use GUID_buf_string in GUID_string Signed-off-by: Volker Lendecke Reviewed-by: Matthieu Patou --- librpc/ndr/uuid.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c index 3ceb132f59..654bebd0d0 100644 --- a/librpc/ndr/uuid.c +++ b/librpc/ndr/uuid.c @@ -230,15 +230,8 @@ _PUBLIC_ int GUID_compare(const struct GUID *u1, const struct GUID *u2) */ _PUBLIC_ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid) { - return talloc_asprintf(mem_ctx, - "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - guid->time_low, guid->time_mid, - guid->time_hi_and_version, - guid->clock_seq[0], - guid->clock_seq[1], - guid->node[0], guid->node[1], - guid->node[2], guid->node[3], - guid->node[4], guid->node[5]); + struct GUID_txt_buf buf; + return talloc_strdup(mem_ctx, GUID_buf_string(guid, &buf)); } /** -- cgit