diff options
author | Andreas Schneider <asn@samba.org> | 2014-09-26 13:25:41 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-09-28 01:32:09 +0200 |
commit | 763d37e6a4ba7121e940a95e56502180c13e363e (patch) | |
tree | a0fa84f85664b3eae4e6a44fc838ec5bf56cee99 /libcli/cldap | |
parent | 321e948c98b01e344e97a0be22ed79f95feb9697 (diff) | |
download | samba-763d37e6a4ba7121e940a95e56502180c13e363e.tar.gz |
libcli: Remove unreachable code in cldap.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'libcli/cldap')
-rw-r--r-- | libcli/cldap/cldap.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index eb4f102e6ab..df81767a760 100644 --- a/libcli/cldap/cldap.c +++ b/libcli/cldap/cldap.c @@ -919,9 +919,7 @@ char *cldap_netlogon_create_filter(TALLOC_CTX *mem_ctx, } if (io->in.domain_sid) { struct dom_sid *sid = dom_sid_parse_talloc(mem_ctx, io->in.domain_sid); - if (filter == NULL) { - return NULL; - } + filter = talloc_asprintf_append_buffer(filter, "(domainSid=%s)", ldap_encode_ndr_dom_sid(mem_ctx, sid)); if (filter == NULL) { @@ -931,9 +929,7 @@ char *cldap_netlogon_create_filter(TALLOC_CTX *mem_ctx, if (io->in.domain_guid) { struct GUID guid; GUID_from_string(io->in.domain_guid, &guid); - if (filter == NULL) { - return NULL; - } + filter = talloc_asprintf_append_buffer(filter, "(DomainGuid=%s)", ldap_encode_ndr_GUID(mem_ctx, &guid)); if (filter == NULL) { |