summaryrefslogtreecommitdiffstats
path: root/lib/addns/dnsrecord.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/addns/dnsrecord.c')
-rw-r--r--lib/addns/dnsrecord.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/addns/dnsrecord.c b/lib/addns/dnsrecord.c
index 559c2644d44..2240d08fb91 100644
--- a/lib/addns/dnsrecord.c
+++ b/lib/addns/dnsrecord.c
@@ -31,8 +31,8 @@ DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name,
struct dns_question *q;
DNS_ERROR err;
- if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_request)) ||
- !(req->questions = TALLOC_ARRAY(req, struct dns_question *, 1)) ||
+ if (!(req = talloc_zero(mem_ctx, struct dns_request)) ||
+ !(req->questions = talloc_array(req, struct dns_question *, 1)) ||
!(req->questions[0] = talloc(req->questions,
struct dns_question))) {
TALLOC_FREE(req);
@@ -64,8 +64,8 @@ DNS_ERROR dns_create_update( TALLOC_CTX *mem_ctx, const char *name,
struct dns_zone *z;
DNS_ERROR err;
- if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_update_request)) ||
- !(req->zones = TALLOC_ARRAY(req, struct dns_zone *, 1)) ||
+ if (!(req = talloc_zero(mem_ctx, struct dns_update_request)) ||
+ !(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;
@@ -131,8 +131,8 @@ DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host,
return ERROR_DNS_SUCCESS;
}
- ip = ((struct sockaddr_in *)pss)->sin_addr;
- if (!(data = (uint8 *)TALLOC_MEMDUP(mem_ctx, (const void *)&ip.s_addr,
+ ip = ((const struct sockaddr_in *)pss)->sin_addr;
+ if (!(data = (uint8 *)talloc_memdup(mem_ctx, (const void *)&ip.s_addr,
sizeof(ip.s_addr)))) {
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;
}
@@ -308,7 +308,7 @@ DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec,
{
struct dns_rrec **new_records;
- if (!(new_records = TALLOC_REALLOC_ARRAY(mem_ctx, *records,
+ if (!(new_records = talloc_realloc(mem_ctx, *records,
struct dns_rrec *,
(*num_records)+1))) {
return ERROR_DNS_NO_MEMORY;