From 70278929fc3065febf7e2d0b538a30cfc073f0fd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 12 Jul 2005 01:21:18 +0000 Subject: r8335: removed some duplicated code (This used to be commit 1536d66662193568a51793d65fb319882db9d089) --- source4/librpc/ndr/ndr_misc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'source4/librpc') 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)); -- cgit