Commit 88a6fef4 authored by Mark Andrews's avatar Mark Andrews
Browse files

init dns_rdata_t's

parent 253f774e
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.120 2000/12/11 22:55:25 bwelling Exp $ */
/* $Id: dnssec-signzone.c,v 1.121 2000/12/11 23:09:36 marka Exp $ */
#include <config.h>
......@@ -475,14 +475,14 @@ signset(dns_diff_t *diff, dns_dbnode_t *node, dns_name_t *name,
static isc_boolean_t
hasnullkey(dns_rdataset_t *rdataset) {
isc_result_t result;
dns_rdata_t rdata;
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_boolean_t found = ISC_FALSE;
result = dns_rdataset_first(rdataset);
while (result == ISC_R_SUCCESS) {
dst_key_t *key = NULL;
dns_rdata_init(&rdata);
dns_rdata_reset(&rdata);
dns_rdataset_current(rdataset, &rdata);
result = dns_dnssec_keyfromrdata(dns_rootname,
&rdata, mctx, &key);
......@@ -542,13 +542,11 @@ importparentsig(dns_diff_t *diff, dns_name_t *name, dns_rdataset_t *set) {
dns_db_t *newdb = NULL;
dns_dbnode_t *newnode = NULL;
dns_rdataset_t newset, sigset;
dns_rdata_t rdata, newrdata;
dns_rdata_t rdata = DNS_RDATA_INIT, newrdata = DNS_RDATA_INIT;
isc_result_t result;
dns_rdataset_init(&newset);
dns_rdataset_init(&sigset);
dns_rdata_init(&rdata);
dns_rdata_init(&newrdata);
opendb("signedkey-", name, dns_db_class(gdb), &newdb);
if (newdb == NULL)
......@@ -1375,7 +1373,7 @@ loadzonepubkeys(dns_db_t *db) {
dns_dbversion_t *currentversion = NULL;
dns_dbnode_t *node = NULL;
dns_rdataset_t rdataset;
dns_rdata_t rdata;
dns_rdata_t rdata = DNS_RDATA_INIT;
dst_key_t *pubkey;
signer_key_t *key;
isc_result_t result;
......@@ -1397,7 +1395,7 @@ loadzonepubkeys(dns_db_t *db) {
check_result(result, "dns_rdataset_first");
while (result == ISC_R_SUCCESS) {
pubkey = NULL;
dns_rdata_init(&rdata);
dns_rdata_reset(&rdata);
dns_rdataset_current(&rdataset, &rdata);
result = dns_dnssec_keyfromrdata(gorigin, &rdata, mctx,
&pubkey);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdgrbn.c,v 1.2 2000/11/18 02:57:07 bwelling Exp $ */
/* $Id: lwdgrbn.c,v 1.3 2000/12/11 23:09:38 marka Exp $ */
#include <config.h>
......@@ -46,7 +46,7 @@ lookup_done(isc_task_t *task, isc_event_t *event) {
dns_name_t *name;
dns_rdataset_t *rdataset;
dns_rdataset_t *sigrdataset;
dns_rdata_t rdata;
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_result_t result;
lwres_result_t lwresult;
isc_region_t r;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: xfrout.c,v 1.84 2000/12/11 19:19:14 bwelling Exp $ */
/* $Id: xfrout.c,v 1.85 2000/12/11 23:09:39 marka Exp $ */
#include <config.h>
......@@ -263,7 +263,7 @@ log_rr(dns_name_t *name, dns_rdata_t *rdata, isc_uint32_t ttl) {
char mem[2000];
dns_rdatalist_t rdl;
dns_rdataset_t rds;
dns_rdata_t rd;
dns_rdata_t rd = DNS_RDATA_INIT;
rdl.type = rdata->type;
rdl.rdclass = rdata->rdclass;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsupdate.c,v 1.74 2000/12/11 20:53:25 bwelling Exp $ */
/* $Id: nsupdate.c,v 1.75 2000/12/11 23:09:40 marka Exp $ */
#include <config.h>
......@@ -1279,7 +1279,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
dns_name_t *name = NULL;
dns_rdataset_t *soaset = NULL;
dns_rdata_soa_t soa;
dns_rdata_t soarr;
dns_rdata_t soarr = DNS_RDATA_INIT;
int pass = 0;
dns_name_t master;
isc_sockaddr_t *serveraddr, tempaddr;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: t_db.c,v 1.25 2000/08/01 01:13:35 tale Exp $ */
/* $Id: t_db.c,v 1.26 2000/12/11 23:09:43 marka Exp $ */
#include <config.h>
......@@ -896,10 +896,10 @@ t_dns_db_newversion(char **av) {
isc_buffer_t newname_buffer;
dns_fixedname_t dns_newname;
dns_fixedname_t dns_foundname;
dns_rdata_t added_rdata;
dns_rdata_t added_rdata = DNS_RDATA_INIT;
const char * added_rdata_data;
dns_rdataset_t added_rdataset;
dns_rdata_t found_rdata;
dns_rdata_t found_rdata = DNS_RDATA_INIT;
dns_rdataset_t found_rdataset;
dns_rdatatype_t rdatatype;
dns_rdataclass_t rdataclass;
......@@ -1174,10 +1174,10 @@ t_dns_db_closeversion_1(char **av) {
dns_fixedname_t dns_newname;
dns_fixedname_t dns_foundname;
dns_fixedname_t dns_existingname;
dns_rdata_t added_rdata;
dns_rdata_t added_rdata = DNS_RDATA_INIT;
const char * added_rdata_data;
dns_rdataset_t added_rdataset;
dns_rdata_t found_rdata;
dns_rdata_t found_rdata = DNS_RDATA_INIT;
dns_rdataset_t found_rdataset;
dns_rdatatype_t new_rdatatype;
dns_rdatatype_t existing_rdatatype;
......@@ -1535,10 +1535,10 @@ t_dns_db_closeversion_2(char **av) {
dns_fixedname_t dns_newname;
dns_fixedname_t dns_foundname;
dns_fixedname_t dns_existingname;
dns_rdata_t added_rdata;
dns_rdata_t added_rdata = DNS_RDATA_INIT;
const char * added_rdata_data;
dns_rdataset_t added_rdataset;
dns_rdata_t found_rdata;
dns_rdata_t found_rdata = DNS_RDATA_INIT;
dns_rdataset_t found_rdataset;
dns_rdatatype_t new_rdatatype;
dns_rdatatype_t existing_rdatatype;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata_test.c,v 1.33 2000/11/14 23:29:46 bwelling Exp $ */
/* $Id: rdata_test.c,v 1.34 2000/12/11 23:09:42 marka Exp $ */
#include <config.h>
......@@ -786,8 +786,8 @@ main(int argc, char *argv[]) {
isc_buffer_t dbuf;
isc_buffer_t tbuf;
isc_buffer_t wbuf;
dns_rdata_t rdata;
dns_rdata_t last;
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdata_t last = DNS_RDATA_INIT;
int need_eol = 0;
int wire = 0;
dns_compress_t cctx;
......@@ -1028,7 +1028,7 @@ main(int argc, char *argv[]) {
}
if (tostruct) {
isc_mem_t *mctx2 = NULL;
dns_rdata_t rdata2;
dns_rdata_t rdata2 = DNS_RDATA_INIT;
isc_buffer_t vbuf;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx2)
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zonetodb.c,v 1.7 2000/11/20 19:56:12 bwelling Exp $ */
/* $Id: zonetodb.c,v 1.8 2000/12/11 23:09:44 marka Exp $ */
#include <isc/buffer.h>
#include <isc/mem.h>
......@@ -134,7 +134,7 @@ main(int argc, char **argv) {
dns_dbnode_t *node;
dns_rdatasetiter_t *rdsiter;
dns_rdataset_t rdataset;
dns_rdata_t rdata;
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_mem_t *mctx = NULL;
isc_buffer_t b;
isc_result_t result;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zonetodb.c,v 1.7 2000/11/20 19:56:12 bwelling Exp $ */
/* $Id: zonetodb.c,v 1.8 2000/12/11 23:09:44 marka Exp $ */
#include <isc/buffer.h>
#include <isc/mem.h>
......@@ -134,7 +134,7 @@ main(int argc, char **argv) {
dns_dbnode_t *node;
dns_rdatasetiter_t *rdsiter;
dns_rdataset_t rdataset;
dns_rdata_t rdata;
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_mem_t *mctx = NULL;
isc_buffer_t b;
isc_result_t result;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdataset.c,v 1.52 2000/11/10 03:16:19 gson Exp $ */
/* $Id: rdataset.c,v 1.53 2000/12/11 23:09:45 marka Exp $ */
#include <config.h>
......@@ -278,7 +278,7 @@ dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
void *order_arg,
unsigned int *countp)
{
dns_rdata_t rdata;
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_region_t r;
isc_result_t result;
unsigned int i, count;
......@@ -466,7 +466,7 @@ isc_result_t
dns_rdataset_additionaldata(dns_rdataset_t *rdataset,
dns_additionaldatafunc_t add, void *arg)
{
dns_rdata_t rdata;
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_result_t result;
/*
......
......@@ -16,7 +16,7 @@
*/
/*
* $Id: tkey.c,v 1.56 2000/12/11 19:24:25 bwelling Exp $
* $Id: tkey.c,v 1.57 2000/12/11 23:09:47 marka Exp $
*/
#include <config.h>
......@@ -227,7 +227,7 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
isc_result_t result = ISC_R_SUCCESS;
dns_name_t *keyname, ourname;
dns_rdataset_t *keyset;
dns_rdata_t keyrdata, ourkeyrdata;
dns_rdata_t keyrdata = DNS_RDATA_INIT, ourkeyrdata = DNS_RDATA_INIT;
isc_boolean_t found_key = ISC_FALSE, found_incompatible = ISC_FALSE;
dst_key_t *pubkey = NULL;
isc_buffer_t ourkeybuf, *shared = NULL;
......@@ -535,7 +535,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
dns_rdata_tkey_t tkeyin, tkeyout;
dns_name_t *qname, *name, *keyname, tempkeyname, *signer, tsigner;
dns_rdataset_t *tkeyset;
dns_rdata_t tkeyrdata, *rdata = NULL;
dns_rdata_t tkeyrdata = DNS_RDATA_INIT, *rdata = NULL;
isc_buffer_t *dynbuf = NULL;
dns_namelist_t namelist;
isc_boolean_t freealg = ISC_FALSE;
......@@ -1022,10 +1022,10 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dst_key_t *key, isc_buffer_t *nonce,
dns_tsigkey_t **outkey, dns_tsig_keyring_t *ring)
{
dns_rdata_t qtkeyrdata, rtkeyrdata;
dns_rdata_t qtkeyrdata = DNS_RDATA_INIT, rtkeyrdata = DNS_RDATA_INIT;
dns_name_t keyname, *tkeyname, *theirkeyname, *ourkeyname, *tempname;
dns_rdataset_t *theirkeyset = NULL, *ourkeyset = NULL;
dns_rdata_t theirkeyrdata;
dns_rdata_t theirkeyrdata = DNS_RDATA_INIT;
dst_key_t *theirkey;
dns_rdata_tkey_t qtkey, rtkey;
unsigned char secretdata[256];
......@@ -1156,7 +1156,7 @@ dns_tkey_processgssresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dns_name_t *gname, void *cred, void **context,
dns_tsigkey_t **outkey, dns_tsig_keyring_t *ring)
{
dns_rdata_t rtkeyrdata, qtkeyrdata;
dns_rdata_t rtkeyrdata = DNS_RDATA_INIT, qtkeyrdata = DNS_RDATA_INIT;
dns_name_t *tkeyname;
dns_rdata_tkey_t rtkey, qtkey;
isc_buffer_t outtoken;
......@@ -1216,7 +1216,7 @@ isc_result_t
dns_tkey_processdeleteresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dns_tsig_keyring_t *ring)
{
dns_rdata_t qtkeyrdata, rtkeyrdata;
dns_rdata_t qtkeyrdata = DNS_RDATA_INIT, rtkeyrdata = DNS_RDATA_INIT;
dns_name_t *tkeyname, *tempname;
dns_rdata_tkey_t qtkey, rtkey;
dns_tsigkey_t *tsigkey = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment