summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/ndr/ndr_misc.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source4/librpc/ndr/ndr_misc.c b/source4/librpc/ndr/ndr_misc.c
index 3d885a40e5..189d2afffb 100644
--- a/source4/librpc/ndr/ndr_misc.c
+++ b/source4/librpc/ndr/ndr_misc.c
@@ -145,17 +145,13 @@ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid)
char *GUID_string2(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]);
+ char *ret, *s = GUID_string(mem_ctx, guid);
+ ret = talloc_asprintf(mem_ctx, "{%s}", s);
+ talloc_free(s);
+ return ret;
}
+
void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid)
{
ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid));