diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-12 01:21:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:20:07 -0500 |
commit | 70278929fc3065febf7e2d0b538a30cfc073f0fd (patch) | |
tree | ace8fc6567919ada89f3f9e0dd380448106e8f0b /source4/librpc | |
parent | 8435fbc4afe66848ff6732d653dc6e7b692fb622 (diff) | |
download | samba-70278929fc3065febf7e2d0b538a30cfc073f0fd.tar.gz samba-70278929fc3065febf7e2d0b538a30cfc073f0fd.tar.xz samba-70278929fc3065febf7e2d0b538a30cfc073f0fd.zip |
r8335: removed some duplicated code
(This used to be commit 1536d66662193568a51793d65fb319882db9d089)
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/ndr/ndr_misc.c | 14 |
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)); |