#include "util/net_help.h"
struct acl_list*
-acl_list_create()
+acl_list_create(void)
{
struct acl_list* acl = (struct acl_list*)calloc(1,
sizeof(struct acl_list));
* Create acl structure
* @return new structure or NULL on error.
*/
-struct acl_list* acl_list_create();
+struct acl_list* acl_list_create(void);
/**
* Delete acl structure.
* Stores signals to replay later.
*/
static void
-signal_handling_record()
+signal_handling_record(void)
{
if( signal(SIGTERM, record_sigh) == SIG_ERR ||
#ifdef SIGQUIT
}
struct daemon*
-daemon_init()
+daemon_init(void)
{
struct daemon* daemon = (struct daemon*)calloc(1,
sizeof(struct daemon));
* @param shufport: the portlist output.
* @return number of ports available.
*/
-int daemon_get_shufport(struct daemon* daemon, int* shufport)
+static int daemon_get_shufport(struct daemon* daemon, int* shufport)
{
int i, n, k, temp;
int avail = 0;
free(shufport);
}
+#ifdef THREADS_DISABLED
/**
* Close all pipes except for the numbered thread.
* @param daemon: daemon to close pipes in.
* @param thr: thread number 0..num-1 of thread to skip.
*/
-void close_other_pipes(struct daemon* daemon, int thr)
+static void close_other_pipes(struct daemon* daemon, int thr)
{
int i;
for(i=0; i<daemon->num; i++)
}
}
}
+#endif /* THREADS_DISABLED */
/**
* Function to start one thread.
* Initialize daemon structure.
* @return: The daemon structure, or NULL on error.
*/
-struct daemon* daemon_init();
+struct daemon* daemon_init(void);
/**
* Open shared listening ports (if needed).
}
/** tell other processes to execute the command */
-void
+static void
distribute_cmd(struct daemon_remote* rc, SSL* ssl, char* cmd)
{
int i;
#endif /* UNBOUND_ALLOC_STATS */
/** Report on memory usage by this thread and global */
-void
+static void
worker_mem_report(struct worker* ATTR_UNUSED(worker),
struct serviced_query* ATTR_UNUSED(cur_serv))
{
+7 July 2010: Wouter
+ - Neat function prototypes, unshadowed local declarations.
+
6 July 2010: Wouter
- failure to chown the pidfile is not fatal any more.
- testbound uses UTC timezone.
#include "util/net_help.h"
struct iter_donotq*
-donotq_create()
+donotq_create(void)
{
struct iter_donotq* dq = (struct iter_donotq*)calloc(1,
sizeof(struct iter_donotq));
* Create donotqueryaddresses structure
* @return new structure or NULL on error.
*/
-struct iter_donotq* donotq_create();
+struct iter_donotq* donotq_create(void);
/**
* Delete donotqueryaddresses structure.
}
struct iter_forwards*
-forwards_create()
+forwards_create(void)
{
struct iter_forwards* fwd = (struct iter_forwards*)calloc(1,
sizeof(struct iter_forwards));
* Create forwards
* @return new forwards or NULL on error.
*/
-struct iter_forwards* forwards_create();
+struct iter_forwards* forwards_create(void);
/**
* Delete forwards.
#include "util/data/dname.h"
struct iter_hints*
-hints_create()
+hints_create(void)
{
struct iter_hints* hints = (struct iter_hints*)calloc(1,
sizeof(struct iter_hints));
* Create hints
* @return new hints or NULL on error.
*/
-struct iter_hints* hints_create();
+struct iter_hints* hints_create(void);
/**
* Delete hints.
#include "util/net_help.h"
#include "util/storage/dnstree.h"
-struct iter_priv* priv_create()
+struct iter_priv* priv_create(void)
{
struct iter_priv* priv = (struct iter_priv*)calloc(1, sizeof(*priv));
if(!priv)
* Create priv structure
* @return new structure or NULL on error.
*/
-struct iter_priv* priv_create();
+struct iter_priv* priv_create(void);
/**
* Delete priv structure.
* answer is there directly, our answer is there after
* a cname, or there is just a cname. */
for(i=0; i<msg->rep->an_numrrsets; i++) {
- struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
+ s = msg->rep->rrsets[i];
/* if the answer section has NS rrset, and qtype ANY
* and the delegation is lower, and no CNAMEs followed,
* @param initial_state The initial response state (normally this
* is QUERY_RESP_STATE, unless it is known that the request won't
* need iterative processing
- * @param final_state The final state for the response to this
- * request.
+ * @param finalstate The final state for the response to this request.
* @param subq_ret: if newly allocated, the subquerystate, or NULL if it does
* not need initialisation.
* @param v: if true, validation is done on the subquery.
generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype,
uint16_t qclass, struct module_qstate* qstate, int id,
struct iter_qstate* iq, enum iter_state initial_state,
- enum iter_state final_state, struct module_qstate** subq_ret, int v)
+ enum iter_state finalstate, struct module_qstate** subq_ret, int v)
{
struct module_qstate* subq = NULL;
struct iter_qstate* subiq = NULL;
uint16_t qflags = 0; /* OPCODE QUERY, no flags */
struct query_info qinf;
- int prime = (final_state == PRIME_RESP_STATE)?1:0;
+ int prime = (finalstate == PRIME_RESP_STATE)?1:0;
qinf.qname = qname;
qinf.qname_len = qnamelen;
qinf.qtype = qtype;
subiq->depth = iq->depth+1;
outbound_list_init(&subiq->outlist);
subiq->state = initial_state;
- subiq->final_state = final_state;
+ subiq->final_state = finalstate;
subiq->qchase = subq->qinfo;
subiq->chase_flags = subq->query_flags;
subiq->refetch_glue = 0;
};
struct module_func_block*
-iter_get_funcblock()
+iter_get_funcblock(void)
{
return &iter_block;
}
* Get the iterator function block.
* @return: function block with function pointers to iterator methods.
*/
-struct module_func_block* iter_get_funcblock();
+struct module_func_block* iter_get_funcblock(void);
/**
* Get iterator state as a string
#endif /* UB_ON_WINDOWS */
struct ub_ctx*
-ub_ctx_create()
+ub_ctx_create(void)
{
struct ub_ctx* ctx;
unsigned int seed;
&pythonmod_clear, &pythonmod_get_mem
};
-struct module_func_block* pythonmod_get_funcblock()
+struct module_func_block* pythonmod_get_funcblock(void)
{
return &pythonmod_block;
}
* Get the module function block.
* @return: function block with function pointers to module methods.
*/
-struct module_func_block* pythonmod_get_funcblock();
+struct module_func_block* pythonmod_get_funcblock(void);
/** python module init */
int pythonmod_init(struct module_env* env, int id);
#include "util/data/msgparse.h"
struct local_zones*
-local_zones_create()
+local_zones_create(void)
{
struct local_zones* zones = (struct local_zones*)calloc(1,
sizeof(*zones));
* @param type: type to look for (host order).
* @return rrset pointer or NULL if not found.
*/
-struct local_rrset*
+static struct local_rrset*
local_data_find_type(struct local_data* data, uint16_t type)
{
struct local_rrset* p;
* Create local zones storage
* @return new struct or NULL on error.
*/
-struct local_zones* local_zones_create();
+struct local_zones* local_zones_create(void);
/**
* Delete local zones storage
static int num_wait = 0;
/** usage information for asynclook */
-void usage(char* argv[])
+static void usage(char* argv[])
{
printf("usage: %s [options] name ...\n", argv[0]);
printf("names are looked up at the same time, asynchronously.\n");
static pid_t check_lock_pid;
/** print all possible debug info on the state of the system */
-static void total_debug_info();
+static void total_debug_info(void);
/** print pretty lock error and exit */
static void lock_error(struct checked_lock* lock,
}
/** init the main thread */
-void checklock_start()
+void checklock_start(void)
{
if(!key_created) {
struct thr_check* thisthr = (struct thr_check*)calloc(1,
}
/** stop checklocks */
-void checklock_stop()
+void checklock_stop(void)
{
if(key_created) {
int i;
/** count number of thread infos */
static int
-count_thread_infos()
+count_thread_infos(void)
{
int cnt = 0;
int i;
}
static void
-total_debug_info()
+total_debug_info(void)
{
int i;
log_info("checklocks: supervising %d threads.",
/**
* Initialise checklock. Sets up internal debug structures.
*/
-void checklock_start();
+void checklock_start(void);
/**
* Cleanup internal debug state.
*/
-void checklock_stop();
+void checklock_stop(void);
/**
* Init locks.
};
/** usage information for delayer */
-void usage(char* argv[])
+static void usage(char* argv[])
{
printf("usage: %s [options]\n", argv[0]);
printf(" -f addr : use addr, forward to that server, @port.\n");
}
void
-fake_event_cleanup()
+fake_event_cleanup(void)
{
replay_scenario_delete(saved_scenario);
saved_scenario = NULL;
/**
* Deinit fake event services.
*/
-void fake_event_cleanup();
+void fake_event_cleanup(void);
/**
* Get filename to store temporary config stuff. The pid is added. in /tmp.
ldns_buffer_write_u16_at(buf, 0, 0); /* zero ID */
if(rec) LDNS_RD_SET(ldns_buffer_begin(buf));
if(edns) {
- struct edns_data edns;
- memset(&edns, 0, sizeof(edns));
- edns.edns_present = 1;
- edns.udp_size = EDNS_ADVERTISED_SIZE;
+ struct edns_data ed;
+ memset(&ed, 0, sizeof(ed));
+ ed.edns_present = 1;
+ ed.udp_size = EDNS_ADVERTISED_SIZE;
/* Set DO bit in all EDNS datagrams ... */
- edns.bits = EDNS_DO;
- attach_edns_record(buf, &edns);
+ ed.bits = EDNS_DO;
+ attach_edns_record(buf, &ed);
}
ldns_rdf_deep_free(rdf);
return 1;
#include "testcode/readhex.h"
/** usage information for pktview */
-void usage(char* argv[])
+static void usage(char* argv[])
{
printf("usage: %s\n", argv[0]);
printf("present hex packet on stdin.\n");
}
/** read hex input */
-void read_input(ldns_buffer* pkt, FILE* in)
+static void read_input(ldns_buffer* pkt, FILE* in)
{
char buf[102400];
char* np = buf;
}
/** analyze domain name in packet, possibly compressed */
-void analyze_dname(ldns_buffer* pkt)
+static void analyze_dname(ldns_buffer* pkt)
{
size_t oldpos = ldns_buffer_position(pkt);
size_t len;
}
/** analyze rdata in packet */
-void analyze_rdata(ldns_buffer*pkt, const ldns_rr_descriptor* desc,
+static void analyze_rdata(ldns_buffer*pkt, const ldns_rr_descriptor* desc,
uint16_t rdlen)
{
int rdf = 0;
}
/** analyze rr in packet */
-void analyze_rr(ldns_buffer* pkt, int q)
+static void analyze_rr(ldns_buffer* pkt, int q)
{
uint16_t type, dclass, len;
uint32_t ttl;
}
/** analyse pkt */
-void analyze(ldns_buffer* pkt)
+static void analyze(ldns_buffer* pkt)
{
uint16_t i, f, qd, an, ns, ar;
int rrnum = 0;
}
/** get var from store */
-struct replay_var*
+static struct replay_var*
macro_getvar(rbtree_t* store, char* name)
{
struct replay_var k;
#endif
/** usage information for streamtcp */
-void usage(char* argv[])
+static void usage(char* argv[])
{
printf("usage: %s [options] name type class ...\n", argv[0]);
printf(" sends the name-type-class queries over TCP.\n");
/**
* Add options from string to passed argc. splits on whitespace.
- * @param optarg: the option argument, "-v -p 12345" or so.
+ * @param args: the option argument, "-v -p 12345" or so.
* @param pass_argc: ptr to the argc for unbound. Modified.
* @param pass_argv: the argv to pass to unbound. Modified.
*/
static void
-add_opts(const char* optarg, int* pass_argc, char* pass_argv[])
+add_opts(const char* args, int* pass_argc, char* pass_argv[])
{
- const char *p = optarg, *np;
+ const char *p = args, *np;
size_t len;
while(p && isspace((int)*p))
p++;
unit_assert(anchors_lookup(a, (uint8_t*)"\002oo\000", 4, c) == NULL);
}
-void anchors_test()
+void anchors_test(void)
{
ldns_buffer* buff = ldns_buffer_new(65800);
struct val_anchors* a;
/** test query_dname_compare */
static void
-dname_test_query_dname_compare()
+dname_test_query_dname_compare(void)
{
unit_show_func("util/data/dname.c", "query_dname_compare");
unit_assert(query_dname_compare((uint8_t*)"", (uint8_t*)"") == 0);
/** test dname_count_labels */
static void
-dname_test_count_labels()
+dname_test_count_labels(void)
{
unit_show_func("util/data/dname.c", "dname_count_labels");
unit_assert(dname_count_labels((uint8_t*)"") == 1);
/** test dname_count_size_labels */
static void
-dname_test_count_size_labels()
+dname_test_count_size_labels(void)
{
size_t sz = 0;
unit_show_func("util/data/dname.c", "dname_count_size_labels");
/** test dname_lab_cmp */
static void
-dname_test_dname_lab_cmp()
+dname_test_dname_lab_cmp(void)
{
int ml = 0; /* number of labels that matched exactly */
unit_show_func("util/data/dname.c", "dname_lab_cmp");
/** test dname_subdomain_c */
static void
-dname_test_subdomain()
+dname_test_subdomain(void)
{
unit_show_func("util/data/dname.c", "dname_subdomain");
unit_assert(dname_subdomain_c(
/** test dname_strict_subdomain */
static void
-dname_test_strict_subdomain()
+dname_test_strict_subdomain(void)
{
unit_show_func("util/data/dname.c", "dname_strict_subdomain");
unit_assert(!dname_strict_subdomain(
/** test dname_is_root */
static void
-dname_test_isroot()
+dname_test_isroot(void)
{
unit_show_func("util/data/dname.c", "dname_isroot");
unit_assert(dname_is_root((uint8_t*)"\000"));
/** test dname_remove_label */
static void
-dname_test_removelabel()
+dname_test_removelabel(void)
{
uint8_t* orig = (uint8_t*)"\007example\003com\000";
uint8_t* n = orig;
/** test dname_signame_label_count */
static void
-dname_test_sigcount()
+dname_test_sigcount(void)
{
unit_show_func("util/data/dname.c", "dname_signame_label_count");
unit_assert(dname_signame_label_count((uint8_t*)"\000") == 0);
/** test dname_is_wild routine */
static void
-dname_test_iswild()
+dname_test_iswild(void)
{
unit_show_func("util/data/dname.c", "dname_iswild");
unit_assert( !dname_is_wild((uint8_t*)"\000") );
/** test dname_canonical_compare */
static void
-dname_test_canoncmp()
+dname_test_canoncmp(void)
{
unit_show_func("util/data/dname.c", "dname_canonical_compare");
/* equality */
/** Test dname_get_shared_topdomain */
static void
-dname_test_topdomain()
+dname_test_topdomain(void)
{
unit_show_func("util/data/dname.c", "dname_get_shared_topdomain");
unit_assert( query_dname_compare(
/** Test dname_valid */
static void
-dname_test_valid()
+dname_test_valid(void)
{
unit_show_func("util/data/dname.c", "dname_valid");
unit_assert( dname_valid(
ldns_buffer_flip(boundbuf);
}
-void dname_test()
+void dname_test(void)
{
ldns_buffer* loopbuf = ldns_buffer_new(14);
ldns_buffer* boundbuf = ldns_buffer_new(16);
if(0) lruhash_status(table, "hashtest", 1);
}
-void lruhash_test()
+void lruhash_test(void)
{
/* start very very small array, so it can do lots of table_grow() */
/* also small in size so that reclaim has to be done quickly. */
#include "util/alloc.h"
/** test alloc code */
static void
-alloc_test() {
+alloc_test(void) {
alloc_special_t *t1, *t2;
struct alloc_cache major, minor1, minor2;
int i;
#include "util/net_help.h"
/** test net code */
static void
-net_test()
+net_test(void)
{
const char* t4[] = {"\000\000\000\000",
"\200\000\000\000",
#include "util/config_file.h"
/** test config_file: cfg_parse_memsize */
static void
-config_memsize_test()
+config_memsize_test(void)
{
size_t v = 0;
unit_show_func("util/config_file.c", "cfg_parse_memsize");
#include "util/rtt.h"
/** test RTT code */
static void
-rtt_test()
+rtt_test(void)
{
int init = 376;
int i;
#include "util/config_file.h"
/** test host cache */
static void
-infra_test()
+infra_test(void)
{
struct sockaddr_storage one;
socklen_t onelen;
#include "util/random.h"
/** test randomness */
static void
-rnd_test()
+rnd_test(void)
{
struct ub_randstate* r;
int num = 1000, i;
void unit_show_feature(const char* feature);
/** unit test lruhashtable implementation */
-void lruhash_test();
+void lruhash_test(void);
/** unit test slabhashtable implementation */
-void slabhash_test();
+void slabhash_test(void);
/** unit test for msgreply and msgparse */
-void msgparse_test();
+void msgparse_test(void);
/** unit test dname handling functions */
-void dname_test();
+void dname_test(void);
/** unit test trust anchor storage functions */
-void anchors_test();
+void anchors_test(void);
/** unit test for verification functions */
-void verify_test();
+void verify_test(void);
/** unit test for negative cache functions */
-void neg_test();
+void neg_test(void);
/** unit test for regional allocator functions */
-void regional_test();
+void regional_test(void);
#endif /* TESTCODE_UNITMAIN_H */
fclose(in);
}
-void msgparse_test()
+void msgparse_test(void)
{
ldns_buffer* pkt = ldns_buffer_new(65553);
ldns_buffer* out = ldns_buffer_new(65553);
}
/** get static pointer to random zone name */
-static char* get_random_zone()
+static char* get_random_zone(void)
{
static char zname[256];
int labels = random() % 3;
}
}
-void neg_test()
+void neg_test(void)
{
struct val_neg_cache* neg;
srandom(48);
/** test specific cases */
static void
-specific_cases()
+specific_cases(void)
{
struct regional* r = regional_create();
corner_cases(r);
/** randomly allocate stuff */
static void
-random_burden()
+random_burden(void)
{
size_t max_alloc = 2048 + 128; /* small chance of LARGE */
int i;
burden_test(max_alloc);
}
-void regional_test()
+void regional_test(void)
{
unit_show_feature("regional");
specific_cases();
if(0) slabhash_status(table, "hashtest", 1);
}
-void slabhash_test()
+void slabhash_test(void)
{
/* start very very small array, so it can do lots of table_grow() */
/* also small in size so that reclaim has to be done quickly. */
/** Test NSEC type bitmap routine */
static void
-nsectest()
+nsectest(void)
{
/* bitmap starts at type bitmap rdata field */
/* from rfc 4034 example */
}
void
-verify_test()
+verify_test(void)
{
unit_show_feature("signature verify");
verifytest_file("testdata/test_signatures.1", "20070818005004");
static void init_outgoing_availports(int* array, int num);
struct config_file*
-config_create()
+config_create(void)
{
struct config_file* cfg;
cfg = (struct config_file*)calloc(1, sizeof(struct config_file));
return NULL;
}
-struct config_file* config_create_forlib()
+struct config_file* config_create_forlib(void)
{
struct config_file* cfg = config_create();
if(!cfg) return NULL;
}
/** print error with file and line number */
-void ub_c_error_va_list(const char *fmt, va_list args)
+static void ub_c_error_va_list(const char *fmt, va_list args)
{
cfg_parser->errors++;
fprintf(stderr, "%s:%d: error: ", cfg_parser->filename,
cfg_parser->line, str);
}
-int ub_c_wrap()
+int ub_c_wrap(void)
{
return 1;
}
* Create config file structure. Filled with default values.
* @return: the new structure or NULL on memory error.
*/
-struct config_file* config_create();
+struct config_file* config_create(void);
/**
* Create config file structure for library use. Filled with default values.
* @return: the new structure or NULL on memory error.
*/
-struct config_file* config_create_forlib();
+struct config_file* config_create_forlib(void);
/**
* Read the config file from the specified filename.
/** block all signals, masks them away. */
void
-ub_thread_blocksigs()
+ub_thread_blocksigs(void)
{
#if defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS) || defined(HAVE_SIGPROCMASK)
# if defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS)
* The errno is logged to the logfile with a descriptive comment.
*/
#define LOCKRET(func) do {\
- int err; \
- if( (err=(func)) != 0) \
+ int lockret_err; \
+ if( (lockret_err=(func)) != 0) \
log_err("%s at %d could not " #func ": %s", \
- __FILE__, __LINE__, strerror(err)); \
+ __FILE__, __LINE__, strerror(lockret_err)); \
} while(0)
/** DEBUG: use thread debug whenever possible */
* Block all signals for this thread.
* fatal exit on error.
*/
-void ub_thread_blocksigs();
+void ub_thread_blocksigs(void);
/**
* unblock one signal for this thread.
}
/** print debug ancillary info */
-void p_ancil(const char* str, struct comm_reply* r)
+static void p_ancil(const char* str, struct comm_reply* r)
{
#if defined(AF_INET6) && defined(IPV6_PKTINFO) && (defined(HAVE_RECVMSG) || defined(HAVE_SENDMSG))
if(r->srctype != 4 && r->srctype != 6) {
}
/** send a UDP reply over specified interface*/
-int
+static int
comm_point_send_udp_msg_if(struct comm_point *c, ldns_buffer* packet,
struct sockaddr* addr, socklen_t addrlen, struct comm_reply* r)
{
struct comm_reply rep;
struct msghdr msg;
struct iovec iov[1];
- ssize_t recv;
+ ssize_t rcv;
char ancil[256];
int i;
#ifndef S_SPLINT_S
msg.msg_controllen = sizeof(ancil);
#endif /* S_SPLINT_S */
msg.msg_flags = 0;
- recv = recvmsg(fd, &msg, 0);
- if(recv == -1) {
+ rcv = recvmsg(fd, &msg, 0);
+ if(rcv == -1) {
if(errno != EAGAIN && errno != EINTR) {
log_err("recvmsg failed: %s", strerror(errno));
}
return;
}
rep.addrlen = msg.msg_namelen;
- ldns_buffer_skip(rep.c->buffer, recv);
+ ldns_buffer_skip(rep.c->buffer, rcv);
ldns_buffer_flip(rep.c->buffer);
rep.srctype = 0;
#ifndef S_SPLINT_S
comm_point_udp_callback(int fd, short event, void* arg)
{
struct comm_reply rep;
- ssize_t recv;
+ ssize_t rcv;
int i;
rep.c = (struct comm_point*)arg;
rep.addrlen = (socklen_t)sizeof(rep.addr);
log_assert(fd != -1);
log_assert(ldns_buffer_remaining(rep.c->buffer) > 0);
- recv = recvfrom(fd, (void*)ldns_buffer_begin(rep.c->buffer),
+ rcv = recvfrom(fd, (void*)ldns_buffer_begin(rep.c->buffer),
ldns_buffer_remaining(rep.c->buffer), 0,
(struct sockaddr*)&rep.addr, &rep.addrlen);
- if(recv == -1) {
+ if(rcv == -1) {
#ifndef USE_WINSOCK
if(errno != EAGAIN && errno != EINTR)
log_err("recvfrom %d failed: %s",
#endif
return;
}
- ldns_buffer_skip(rep.c->buffer, recv);
+ ldns_buffer_skip(rep.c->buffer, rcv);
ldns_buffer_flip(rep.c->buffer);
rep.srctype = 0;
fptr_ok(fptr_whitelist_comm_point(rep.c->callback));
#endif
struct regional*
-regional_create()
+regional_create(void)
{
return regional_create_custom(REGIONAL_CHUNK_SIZE);
}
* Create a new regional.
* @return: newly allocated regional.
*/
-struct regional* regional_create();
+struct regional* regional_create(void);
/**
* Create a new region, with custom settings.
}
}
-struct timehist* timehist_setup()
+struct timehist* timehist_setup(void)
{
struct timehist* hist = (struct timehist*)calloc(1,
sizeof(struct timehist));
}
/** total number in histogram */
-size_t
+static size_t
timehist_count(struct timehist* hist)
{
size_t i, res = 0;
* Setup a histogram, default
* @return histogram or NULL on malloc failure.
*/
-struct timehist* timehist_setup();
+struct timehist* timehist_setup(void);
/**
* Delete histogram
log_info("assembled %d DS and %d DNSKEYs",
(int)tp->numDS, (int)tp->numDNSKEY);
if(0) { /* turned off because it prints to stderr */
- ldns_buffer* buf = ldns_buffer_new(70000);
+ ldns_buffer* bf = ldns_buffer_new(70000);
ldns_rr_list* list;
if(tp->ds_rrset) {
- list = packed_rrset_to_rr_list(tp->ds_rrset, buf);
+ list = packed_rrset_to_rr_list(tp->ds_rrset, bf);
ldns_rr_list_print(stderr, list);
ldns_rr_list_deep_free(list);
}
if(tp->dnskey_rrset) {
- list = packed_rrset_to_rr_list(tp->dnskey_rrset, buf);
+ list = packed_rrset_to_rr_list(tp->dnskey_rrset, bf);
ldns_rr_list_print(stderr, list);
ldns_rr_list_deep_free(list);
}
- ldns_buffer_free(buf);
+ ldns_buffer_free(bf);
}
log_info("file %s", tp->autr->file);
ctime_r(&tp->autr->last_queried, buf);
}
struct val_anchors*
-anchors_create()
+anchors_create(void)
{
struct val_anchors* a = (struct val_anchors*)calloc(1, sizeof(*a));
if(!a)
* Create trust anchor storage
* @return new storage or NULL on error.
*/
-struct val_anchors* anchors_create();
+struct val_anchors* anchors_create(void);
/**
* Delete trust anchor storage.
};
struct module_func_block*
-val_get_funcblock()
+val_get_funcblock(void)
{
return &val_block;
}
* Get the validator function block.
* @return: function block with function pointers to validator methods.
*/
-struct module_func_block* val_get_funcblock();
+struct module_func_block* val_get_funcblock(void);
/**
* Get validator state as a string