diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-15 01:12:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:13 -0500 |
commit | 49bc2672f8c2d75ce35f1ef537057fd05d4689e0 (patch) | |
tree | 52e10baad3a57bdbf714c8eb82dc96c3b4299d19 /source4/libcli | |
parent | 6be47e9bc2484340f40264eb0852b2c1619ee900 (diff) | |
download | samba-49bc2672f8c2d75ce35f1ef537057fd05d4689e0.tar.gz samba-49bc2672f8c2d75ce35f1ef537057fd05d4689e0.tar.bz2 samba-49bc2672f8c2d75ce35f1ef537057fd05d4689e0.zip |
r7598: take advantage of struct data_blob and struct ldb_val being the same
structure in a couple of places
(This used to be commit bcd4671acae2be51958cbae23a0ab2dd2b194a5e)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/ldap/ldap.c | 5 | ||||
-rw-r--r-- | source4/libcli/ldap/ldap_ndr.c | 12 |
2 files changed, 3 insertions, 14 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c index 1a3ab6e0a5..bce3da94ae 100644 --- a/source4/libcli/ldap/ldap.c +++ b/source4/libcli/ldap/ldap.c @@ -603,11 +603,8 @@ static void ldap_decode_attrib(TALLOC_CTX *mem_ctx, struct asn1_data *data, asn1_start_tag(data, ASN1_SET); while (asn1_peek_tag(data, ASN1_OCTET_STRING)) { DATA_BLOB blob; - struct ldb_val value; asn1_read_OctetString(data, &blob); - value.data = blob.data; - value.length = blob.length; - add_value_to_attrib(mem_ctx, &value, attrib); + add_value_to_attrib(mem_ctx, &blob, attrib); data_blob_free(&blob); } asn1_end_tag(data); diff --git a/source4/libcli/ldap/ldap_ndr.c b/source4/libcli/ldap/ldap_ndr.c index 720022c6c2..88ca1ece77 100644 --- a/source4/libcli/ldap/ldap_ndr.c +++ b/source4/libcli/ldap/ldap_ndr.c @@ -25,14 +25,6 @@ #include "libcli/ldap/ldap.h" #include "librpc/gen_ndr/ndr_security.h" -struct ldb_val ldb_blob(DATA_BLOB blob) -{ - struct ldb_val val; - val.data = blob.data; - val.length = blob.length; - return val; -} - /* encode a NDR uint32 as a ldap filter element */ @@ -59,7 +51,7 @@ const char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, struct dom_sid *sid) if (!NT_STATUS_IS_OK(status)) { return NULL; } - ret = ldb_binary_encode(mem_ctx, ldb_blob(blob)); + ret = ldb_binary_encode(mem_ctx, blob); data_blob_free(&blob); return ret; } @@ -78,7 +70,7 @@ const char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid) if (!NT_STATUS_IS_OK(status)) { return NULL; } - ret = ldb_binary_encode(mem_ctx, ldb_blob(blob)); + ret = ldb_binary_encode(mem_ctx, blob); data_blob_free(&blob); return ret; } |