summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-30 11:30:13 +0100
committerVolker Lendecke <vl@samba.org>2010-01-02 12:09:05 +0100
commit583d192e4715e5fa72041e6ea43dbf6c2a559c36 (patch)
tree42b1d68f156e8ee9eda6c313478e2dc52ce3c91d /source3
parentd05e17f875300615c0b8543291e7e021448ddff1 (diff)
downloadsamba-583d192e4715e5fa72041e6ea43dbf6c2a559c36.tar.gz
samba-583d192e4715e5fa72041e6ea43dbf6c2a559c36.tar.bz2
samba-583d192e4715e5fa72041e6ea43dbf6c2a559c36.zip
s3: Adapt sid_dup_talloc to README.Coding
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_sid.c17
1 files 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;
}