diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-11-23 09:20:50 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-11-30 17:17:20 +0100 |
commit | 8d60ac19ed0bc70ec3763614147465c04f28e286 (patch) | |
tree | c3a75e80b1bebd6857ac04ed600c545a4859252a /source4 | |
parent | 813492676c5b876d309bb2db12c794c513fab5c7 (diff) | |
download | samba-8d60ac19ed0bc70ec3763614147465c04f28e286.tar.gz samba-8d60ac19ed0bc70ec3763614147465c04f28e286.tar.bz2 samba-8d60ac19ed0bc70ec3763614147465c04f28e286.zip |
s4:dsdb/descriptor: remove some unnecessary nesting
sd == NULL is checked before.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/descriptor.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c index 21a559f678..9a4f3d3e04 100644 --- a/source4/dsdb/samdb/ldb_modules/descriptor.c +++ b/source4/dsdb/samdb/ldb_modules/descriptor.c @@ -583,16 +583,14 @@ static int descriptor_add(struct ldb_module *module, struct ldb_request *req) if (msg == NULL) { return ldb_oom(ldb); } - if (sd != NULL) { - if (sd_element != NULL) { - sd_element->values[0] = *sd; - } else { - ret = ldb_msg_add_steal_value(msg, - "nTSecurityDescriptor", - sd); - if (ret != LDB_SUCCESS) { - return ret; - } + if (sd_element != NULL) { + sd_element->values[0] = *sd; + } else { + ret = ldb_msg_add_steal_value(msg, + "nTSecurityDescriptor", + sd); + if (ret != LDB_SUCCESS) { + return ret; } } |