summaryrefslogtreecommitdiff
path: root/lib/addns
diff options
context:
space:
mode:
Diffstat (limited to 'lib/addns')
-rw-r--r--lib/addns/dnsmarshall.c14
-rw-r--r--lib/addns/dnsrecord.c6
-rw-r--r--lib/addns/dnssock.c4
-rw-r--r--lib/addns/dnsutils.c2
4 files changed, 13 insertions, 13 deletions
diff --git a/lib/addns/dnsmarshall.c b/lib/addns/dnsmarshall.c
index e5e8cf7962..3401b31469 100644
--- a/lib/addns/dnsmarshall.c
+++ b/lib/addns/dnsmarshall.c
@@ -39,7 +39,7 @@ struct dns_buffer *dns_create_buffer(TALLOC_CTX *mem_ctx)
*/
result->size = 2;
- if (!(result->data = TALLOC_ARRAY(result, uint8, result->size))) {
+ if (!(result->data = talloc_array(result, uint8, result->size))) {
TALLOC_FREE(result);
return NULL;
}
@@ -223,7 +223,7 @@ static void dns_unmarshall_label(TALLOC_CTX *mem_ctx,
label->len = len;
- if (!(label->label = TALLOC_ARRAY(label, char, len+1))) {
+ if (!(label->label = talloc_array(label, char, len+1))) {
buf->error = ERROR_DNS_NO_MEMORY;
goto error;
}
@@ -329,7 +329,7 @@ static void dns_unmarshall_rr(TALLOC_CTX *mem_ctx,
if (!(ERR_DNS_IS_OK(buf->error))) return;
if (r->data_length != 0) {
- if (!(r->data = TALLOC_ARRAY(r, uint8, r->data_length))) {
+ if (!(r->data = talloc_array(r, uint8, r->data_length))) {
buf->error = ERROR_DNS_NO_MEMORY;
return;
}
@@ -406,22 +406,22 @@ DNS_ERROR dns_unmarshall_request(TALLOC_CTX *mem_ctx,
err = ERROR_DNS_NO_MEMORY;
if ((req->num_questions != 0) &&
- !(req->questions = TALLOC_ARRAY(req, struct dns_question *,
+ !(req->questions = talloc_array(req, struct dns_question *,
req->num_questions))) {
goto error;
}
if ((req->num_answers != 0) &&
- !(req->answers = TALLOC_ARRAY(req, struct dns_rrec *,
+ !(req->answers = talloc_array(req, struct dns_rrec *,
req->num_answers))) {
goto error;
}
if ((req->num_auths != 0) &&
- !(req->auths = TALLOC_ARRAY(req, struct dns_rrec *,
+ !(req->auths = talloc_array(req, struct dns_rrec *,
req->num_auths))) {
goto error;
}
if ((req->num_additionals != 0) &&
- !(req->additionals = TALLOC_ARRAY(req, struct dns_rrec *,
+ !(req->additionals = talloc_array(req, struct dns_rrec *,
req->num_additionals))) {
goto error;
}
diff --git a/lib/addns/dnsrecord.c b/lib/addns/dnsrecord.c
index 52391aef78..2d0dc9ec5b 100644
--- a/lib/addns/dnsrecord.c
+++ b/lib/addns/dnsrecord.c
@@ -32,7 +32,7 @@ DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name,
DNS_ERROR err;
if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_request)) ||
- !(req->questions = TALLOC_ARRAY(req, struct dns_question *, 1)) ||
+ !(req->questions = talloc_array(req, struct dns_question *, 1)) ||
!(req->questions[0] = talloc(req->questions,
struct dns_question))) {
TALLOC_FREE(req);
@@ -65,7 +65,7 @@ DNS_ERROR dns_create_update( TALLOC_CTX *mem_ctx, const char *name,
DNS_ERROR err;
if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_update_request)) ||
- !(req->zones = TALLOC_ARRAY(req, struct dns_zone *, 1)) ||
+ !(req->zones = talloc_array(req, struct dns_zone *, 1)) ||
!(req->zones[0] = talloc(req->zones, struct dns_zone))) {
TALLOC_FREE(req);
return ERROR_DNS_NO_MEMORY;
@@ -240,7 +240,7 @@ DNS_ERROR dns_unmarshall_tkey_record(TALLOC_CTX *mem_ctx, struct dns_rrec *rec,
if (!ERR_DNS_IS_OK(buf.error)) goto error;
if (tkey->key_length) {
- if (!(tkey->key = TALLOC_ARRAY(tkey, uint8, tkey->key_length))) {
+ if (!(tkey->key = talloc_array(tkey, uint8, tkey->key_length))) {
buf.error = ERROR_DNS_NO_MEMORY;
goto error;
}
diff --git a/lib/addns/dnssock.c b/lib/addns/dnssock.c
index 42b4e2d40f..da8a52100e 100644
--- a/lib/addns/dnssock.c
+++ b/lib/addns/dnssock.c
@@ -262,7 +262,7 @@ static DNS_ERROR dns_receive_tcp(TALLOC_CTX *mem_ctx,
buf->size = ntohs(len);
if (buf->size) {
- if (!(buf->data = TALLOC_ARRAY(buf, uint8, buf->size))) {
+ if (!(buf->data = talloc_array(buf, uint8, buf->size))) {
TALLOC_FREE(buf);
return ERROR_DNS_NO_MEMORY;
}
@@ -295,7 +295,7 @@ static DNS_ERROR dns_receive_udp(TALLOC_CTX *mem_ctx,
* UDP based DNS can only be 512 bytes
*/
- if (!(buf->data = TALLOC_ARRAY(buf, uint8, 512))) {
+ if (!(buf->data = talloc_array(buf, uint8, 512))) {
TALLOC_FREE(buf);
return ERROR_DNS_NO_MEMORY;
}
diff --git a/lib/addns/dnsutils.c b/lib/addns/dnsutils.c
index 37b862c7f0..526179bee3 100644
--- a/lib/addns/dnsutils.c
+++ b/lib/addns/dnsutils.c
@@ -138,7 +138,7 @@ char *dns_generate_keyname( TALLOC_CTX *mem_ctx )
/*
* uuid_unparse gives 36 bytes plus '\0'
*/
- if (!(result = TALLOC_ARRAY(mem_ctx, char, 37))) {
+ if (!(result = talloc_array(mem_ctx, char, 37))) {
return NULL;
}