diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index d36e1ec1bb..66a0b0f87d 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1545,12 +1545,14 @@ int samdb_rid_set_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_dn const char *samdb_server_site_name(struct ldb_context *ldb, TALLOC_CTX *mem_ctx) { - const struct ldb_val *val = ldb_dn_get_rdn_val(samdb_server_site_dn(ldb, mem_ctx)); + const struct ldb_val *val = ldb_dn_get_rdn_val(samdb_server_site_dn(ldb, + mem_ctx)); - if (val != NULL) - return (const char *) val->data; - else + if (val == NULL) { return NULL; + } + + return (const char *) val->data; } /* |