From 583d192e4715e5fa72041e6ea43dbf6c2a559c36 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 30 Dec 2009 11:30:13 +0100 Subject: s3: Adapt sid_dup_talloc to README.Coding --- source3/lib/util_sid.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 639269cac2..1f47bf35f0 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -557,17 +557,18 @@ char *sid_binstring_hex(const DOM_SID *sid) Tallocs a duplicate SID. ********************************************************************/ -DOM_SID *sid_dup_talloc(TALLOC_CTX *ctx, const DOM_SID *src) +struct dom_sid *sid_dup_talloc(TALLOC_CTX *ctx, const struct dom_sid *src) { - DOM_SID *dst; - - if(!src) + struct dom_sid *dst; + + if (src == NULL) { return NULL; - - if((dst = TALLOC_ZERO_P(ctx, DOM_SID)) != NULL) { - sid_copy( dst, src); } - + dst = talloc_zero(ctx, struct dom_sid); + if (dst == NULL) { + return NULL; + } + sid_copy(dst, src); return dst; } -- cgit