lib: Use GUID_buf_string in GUID_string
authorVolker Lendecke <vl@samba.org>
Tue, 30 Sep 2014 06:32:36 +0000 (06:32 +0000)
committerMatthieu Patou <mat@samba.org>
Thu, 2 Oct 2014 10:02:01 +0000 (12:02 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
librpc/ndr/uuid.c

index 3ceb132f59d9bbd994faca4190d0799ed7b00577..654bebd0d08c9c4001fc89b5585d72b18b5468e1 100644 (file)
@@ -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));
 }
 
 /**