svn commit: samba r8335 - in branches/SAMBA_4_0/source/librpc/ndr: .

tridge at samba.org tridge at samba.org
Tue Jul 12 01:21:19 GMT 2005


Author: tridge
Date: 2005-07-12 01:21:18 +0000 (Tue, 12 Jul 2005)
New Revision: 8335

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8335

Log:
removed some duplicated code


Modified:
   branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c	2005-07-11 23:16:50 UTC (rev 8334)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c	2005-07-12 01:21:18 UTC (rev 8335)
@@ -145,17 +145,13 @@
 
 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));



More information about the samba-cvs mailing list