summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-07 15:08:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:27 -0500
commitcd962355abad90a2161765a7be7d26e63572cab7 (patch)
tree21a1e180cfa6396c491301e3e171d8105208bb44 /source4/libcli/ldap
parent6c79213eb80283bb211d2e2161c25337c0a549b7 (diff)
downloadsamba-cd962355abad90a2161765a7be7d26e63572cab7.tar.gz
samba-cd962355abad90a2161765a7be7d26e63572cab7.tar.bz2
samba-cd962355abad90a2161765a7be7d26e63572cab7.zip
r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r--source4/libcli/ldap/ldap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 64f6f90d31..06ff000acf 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -497,7 +497,7 @@ BOOL ldap_encode(struct ldap_message *msg, DATA_BLOB *result, TALLOC_CTX *mem_ct
static const char *blob2string_talloc(TALLOC_CTX *mem_ctx,
DATA_BLOB blob)
{
- char *result = talloc_size(mem_ctx, blob.length+1);
+ char *result = talloc_array(mem_ctx, char, blob.length+1);
memcpy(result, blob.data, blob.length);
result[blob.length] = '\0';
return result;
@@ -955,7 +955,7 @@ NTSTATUS ldap_decode(struct asn1_data *data, struct ldap_message *msg)
return NT_STATUS_LDAP(LDAP_PROTOCOL_ERROR);
}
if (pwlen != 0) {
- char *pw = talloc_size(msg, pwlen+1);
+ char *pw = talloc_array(msg, char, pwlen+1);
if (!pw) {
return NT_STATUS_LDAP(LDAP_OPERATIONS_ERROR);
}
@@ -1162,7 +1162,7 @@ NTSTATUS ldap_decode(struct asn1_data *data, struct ldap_message *msg)
if (len == -1) {
return NT_STATUS_LDAP(LDAP_PROTOCOL_ERROR);
}
- dn = talloc_size(msg, len+1);
+ dn = talloc_array(msg, char, len+1);
if (dn == NULL)
break;
asn1_read(data, dn, len);
@@ -1198,7 +1198,7 @@ NTSTATUS ldap_decode(struct asn1_data *data, struct ldap_message *msg)
if (len == -1) {
return NT_STATUS_LDAP(LDAP_PROTOCOL_ERROR);
}
- newsup = talloc_size(msg, len+1);
+ newsup = talloc_array(msg, char, len+1);
if (newsup == NULL) {
return NT_STATUS_LDAP(LDAP_OPERATIONS_ERROR);
}