diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /lib/addns | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'lib/addns')
-rw-r--r-- | lib/addns/dnsgss.c | 4 | ||||
-rw-r--r-- | lib/addns/dnsmarshall.c | 18 | ||||
-rw-r--r-- | lib/addns/dnsrecord.c | 16 | ||||
-rw-r--r-- | lib/addns/dnssock.c | 8 | ||||
-rw-r--r-- | lib/addns/dnsutils.c | 4 |
5 files changed, 25 insertions, 25 deletions
diff --git a/lib/addns/dnsgss.c b/lib/addns/dnsgss.c index c9037417da..19b734a6a3 100644 --- a/lib/addns/dnsgss.c +++ b/lib/addns/dnsgss.c @@ -92,7 +92,7 @@ static DNS_ERROR dns_negotiate_gss_ctx_int( TALLOC_CTX *mem_ctx, DNS_ERROR err; gss_OID_desc krb5_oid_desc = - { 9, (char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02" }; + { 9, (const char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02" }; *ctx = GSS_C_NO_CONTEXT; input_ptr = NULL; @@ -222,7 +222,7 @@ DNS_ERROR dns_negotiate_sec_ctx( const char *target_realm, gss_name_t targ_name; gss_OID_desc nt_host_oid_desc = - {10, (char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"}; + {10, (const char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"}; TALLOC_CTX *mem_ctx; diff --git a/lib/addns/dnsmarshall.c b/lib/addns/dnsmarshall.c index 5530290c57..59d6470f34 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; } @@ -78,7 +78,7 @@ void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data, new_size += (64 - (new_size % 64)); - if (!(new_data = TALLOC_REALLOC_ARRAY(buf, buf->data, uint8, + if (!(new_data = talloc_realloc(buf, buf->data, uint8, new_size))) { buf->error = ERROR_DNS_NO_MEMORY; return; @@ -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; } @@ -390,7 +390,7 @@ DNS_ERROR dns_unmarshall_request(TALLOC_CTX *mem_ctx, uint16 i; DNS_ERROR err; - if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_request))) { + if (!(req = talloc_zero(mem_ctx, struct dns_request))) { return ERROR_DNS_NO_MEMORY; } @@ -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 559c2644d4..2240d08fb9 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; diff --git a/lib/addns/dnssock.c b/lib/addns/dnssock.c index 42b4e2d40f..aaeb3f03fa 100644 --- a/lib/addns/dnssock.c +++ b/lib/addns/dnssock.c @@ -250,7 +250,7 @@ static DNS_ERROR dns_receive_tcp(TALLOC_CTX *mem_ctx, DNS_ERROR err; uint16 len; - if (!(buf = TALLOC_ZERO_P(mem_ctx, struct dns_buffer))) { + if (!(buf = talloc_zero(mem_ctx, struct dns_buffer))) { return ERROR_DNS_NO_MEMORY; } @@ -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; } @@ -287,7 +287,7 @@ static DNS_ERROR dns_receive_udp(TALLOC_CTX *mem_ctx, struct dns_buffer *buf; ssize_t received; - if (!(buf = TALLOC_ZERO_P(mem_ctx, struct dns_buffer))) { + if (!(buf = talloc_zero(mem_ctx, struct dns_buffer))) { 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..43305a9873 100644 --- a/lib/addns/dnsutils.c +++ b/lib/addns/dnsutils.c @@ -53,7 +53,7 @@ static DNS_ERROR LabelList( TALLOC_CTX *mem_ctx, return ERROR_DNS_INVALID_NAME; } - if (!(result = TALLOC_ZERO_P(mem_ctx, struct dns_domain_label))) { + if (!(result = talloc_zero(mem_ctx, struct dns_domain_label))) { return ERROR_DNS_NO_MEMORY; } @@ -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; } |