Commit af669cb4 authored by Mark Andrews's avatar Mark Andrews

4074. [cleanup] Cleaned up more warnings from gcc -Wshadow. [RT #38708]

parent c10fda07
4074. [cleanup] Cleaned up more warnings from gcc -Wshadow. [RT #38708]
4073. [cleanup] Add libjson-c version number reporting to
"named -V"; normalize version number formatting.
[RT #38056]
......
......@@ -239,7 +239,7 @@ main(int argc, char **argv) {
int dbits = 0;
dns_ttl_t ttl = 0;
isc_boolean_t use_default = ISC_FALSE, use_nsec3 = ISC_FALSE;
isc_stdtime_t publish = 0, activate = 0, revoke = 0;
isc_stdtime_t publish = 0, activate = 0, revokekey = 0;
isc_stdtime_t inactive = 0, delete = 0;
isc_stdtime_t now;
int prepub = -1;
......@@ -427,7 +427,7 @@ main(int argc, char **argv) {
if (setrev || unsetrev)
fatal("-R specified more than once");
revoke = strtotime(isc_commandline_argument,
revokekey = strtotime(isc_commandline_argument,
now, now, &setrev);
unsetrev = !setrev;
break;
......@@ -956,7 +956,7 @@ main(int argc, char **argv) {
"was used. Revoking a ZSK is "
"legal, but undefined.\n",
program);
dst_key_settime(key, DST_TIME_REVOKE, revoke);
dst_key_settime(key, DST_TIME_REVOKE, revokekey);
}
if (setinact)
......
......@@ -96,7 +96,7 @@ main(int argc, char **argv) {
isc_uint32_t flags;
isc_buffer_t buf;
isc_boolean_t force = ISC_FALSE;
isc_boolean_t remove = ISC_FALSE;
isc_boolean_t removefile = ISC_FALSE;
isc_boolean_t id = ISC_FALSE;
if (argc == 1)
......@@ -133,7 +133,7 @@ main(int argc, char **argv) {
}
break;
case 'r':
remove = ISC_TRUE;
removefile = ISC_TRUE;
break;
case 'R':
id = ISC_TRUE;
......@@ -257,7 +257,7 @@ main(int argc, char **argv) {
* Remove old key file, if told to (and if
* it isn't the same as the new file)
*/
if (remove && dst_key_alg(key) != DST_ALG_RSAMD5) {
if (removefile && dst_key_alg(key) != DST_ALG_RSAMD5) {
isc_buffer_init(&buf, oldname, sizeof(oldname));
dst_key_setflags(key, flags & ~DNS_KEYFLAG_REVOKE);
dst_key_buildfilename(key, DST_TYPE_PRIVATE, dir, &buf);
......
......@@ -115,8 +115,8 @@ printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
} else if (epoch) {
fprintf(stream, "%d\n", (int) when);
} else {
time_t time = when;
output = ctime(&time);
time_t timet = when;
output = ctime(&timet);
fprintf(stream, "%s", output);
}
}
......
......@@ -1327,7 +1327,7 @@ cleanup:
* Delete any RRSIG records at a node.
*/
static void
cleannode(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
cleannode(dns_db_t *db, dns_dbversion_t *dbversion, dns_dbnode_t *node) {
dns_rdatasetiter_t *rdsiter = NULL;
dns_rdataset_t set;
isc_result_t result, dresult;
......@@ -1336,7 +1336,7 @@ cleannode(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
return;
dns_rdataset_init(&set);
result = dns_db_allrdatasets(db, node, version, 0, &rdsiter);
result = dns_db_allrdatasets(db, node, dbversion, 0, &rdsiter);
check_result(result, "dns_db_allrdatasets");
result = dns_rdatasetiter_first(rdsiter);
while (result == ISC_R_SUCCESS) {
......@@ -1350,7 +1350,7 @@ cleannode(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
dns_rdataset_disassociate(&set);
result = dns_rdatasetiter_next(rdsiter);
if (destroy) {
dresult = dns_db_deleterdataset(db, node, version,
dresult = dns_db_deleterdataset(db, node, dbversion,
dns_rdatatype_rrsig,
covers);
check_result(dresult, "dns_db_deleterdataset");
......@@ -2783,7 +2783,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
char *filename;
char namestr[DNS_NAME_FORMATSIZE];
dns_db_t *db = NULL;
dns_dbversion_t *version = NULL;
dns_dbversion_t *dbversion = NULL;
dns_diff_t diff;
dns_difftuple_t *tuple = NULL;
dns_fixedname_t fixed;
......@@ -2906,19 +2906,19 @@ writeset(const char *prefix, dns_rdatatype_t type) {
gclass, 0, NULL, &db);
check_result(result, "dns_db_create");
result = dns_db_newversion(db, &version);
result = dns_db_newversion(db, &dbversion);
check_result(result, "dns_db_newversion");
result = dns_diff_apply(&diff, db, version);
result = dns_diff_apply(&diff, db, dbversion);
check_result(result, "dns_diff_apply");
dns_diff_clear(&diff);
result = dns_master_dump(mctx, db, version, style, filename);
result = dns_master_dump(mctx, db, dbversion, style, filename);
check_result(result, "dns_master_dump");
isc_mem_put(mctx, filename, filenamelen + 1);
dns_db_closeversion(db, &version, ISC_FALSE);
dns_db_closeversion(db, &dbversion, ISC_FALSE);
dns_db_detach(&db);
}
......
......@@ -245,7 +245,7 @@ static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
dns_dispatch_t *disp, isc_boolean_t tcp);
static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp,
isc_socket_t *socket);
isc_socket_t *sock);
static inline isc_boolean_t
allowed(isc_netaddr_t *addr, dns_name_t *signer, isc_netaddr_t *ecs_addr,
isc_uint8_t ecs_addrlen, isc_uint8_t *ecs_scope, dns_acl_t *acl);
......@@ -346,12 +346,12 @@ exit_check(ns_client_t *client) {
* We are trying to abort request processing.
*/
if (client->nsends > 0) {
isc_socket_t *socket;
isc_socket_t *sock;
if (TCP_CLIENT(client))
socket = client->tcpsocket;
sock = client->tcpsocket;
else
socket = client->udpsocket;
isc_socket_cancel(socket, client->task,
sock = client->udpsocket;
isc_socket_cancel(sock, client->task,
ISC_SOCKCANCEL_SEND);
}
......@@ -875,17 +875,17 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
isc_result_t result;
isc_region_t r;
isc_sockaddr_t *address;
isc_socket_t *socket;
isc_socket_t *sock;
isc_netaddr_t netaddr;
int match;
unsigned int sockflags = ISC_SOCKFLAG_IMMEDIATE;
isc_dscp_t dispdscp = -1;
if (TCP_CLIENT(client)) {
socket = client->tcpsocket;
sock = client->tcpsocket;
address = NULL;
} else {
socket = client->udpsocket;
sock = client->udpsocket;
address = &client->peeraddr;
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
......@@ -923,7 +923,7 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
CTRACE("sendto");
result = isc_socket_sendto2(socket, &r, client->task,
result = isc_socket_sendto2(sock, &r, client->task,
address, pktinfo,
client->sendevent, sockflags);
if (result == ISC_R_SUCCESS || result == ISC_R_INPROGRESS) {
......@@ -3243,7 +3243,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
}
static isc_result_t
get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *socket)
get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
{
isc_result_t result = ISC_R_SUCCESS;
isc_event_t *ev;
......@@ -3291,7 +3291,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *socket)
client->pipelined = ISC_TRUE;
isc_socket_attach(ifp->tcpsocket, &client->tcplistener);
isc_socket_attach(socket, &client->tcpsocket);
isc_socket_attach(sock, &client->tcpsocket);
isc_socket_setname(client->tcpsocket, "worker-tcp", NULL);
(void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr);
client->peeraddr_valid = ISC_TRUE;
......
......@@ -574,7 +574,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
const char *category, const char **desc, int ncounters,
int *indices, isc_uint64_t *values, int options)
{
int i, index;
int i, idx;
isc_uint64_t value;
stats_dumparg_t dumparg;
FILE *fp;
......@@ -611,8 +611,8 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
#endif
for (i = 0; i < ncounters; i++) {
index = indices[i];
value = values[index];
idx = indices[i];
value = values[idx];
if (value == 0 && (options & ISC_STATSDUMP_VERBOSE) == 0)
continue;
......@@ -621,7 +621,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
case isc_statsformat_file:
fp = arg;
fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
value, desc[index]);
value, desc[idx]);
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
......@@ -639,7 +639,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
"name"));
TRY0(xmlTextWriterWriteString(writer,
ISC_XMLCHAR
desc[index]));
desc[idx]));
TRY0(xmlTextWriterEndElement(writer));
/* </name> */
......@@ -663,7 +663,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
ISC_XMLCHAR
"name",
ISC_XMLCHAR
desc[index]));
desc[idx]));
TRY0(xmlTextWriterWriteFormatString(writer,
"%" ISC_PRINT_QUADFORMAT "u", value));
TRY0(xmlTextWriterEndElement(writer));
......@@ -677,7 +677,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
counter = json_object_new_int64(value);
if (counter == NULL)
return (ISC_R_NOMEMORY);
json_object_object_add(cat, desc[index], counter);
json_object_object_add(cat, desc[idx], counter);
#endif
break;
}
......
......@@ -953,7 +953,7 @@ free_sevent(isc_event_t *ev) {
}
static inline isc_socketevent_t *
allocate_sevent(dns_dispatch_t *disp, isc_socket_t *socket,
allocate_sevent(dns_dispatch_t *disp, isc_socket_t *sock,
isc_eventtype_t type, isc_taskaction_t action, const void *arg)
{
isc_socketevent_t *ev;
......@@ -964,7 +964,7 @@ allocate_sevent(dns_dispatch_t *disp, isc_socket_t *socket,
return (NULL);
DE_CONST(arg, deconst_arg);
ISC_EVENT_INIT(ev, sizeof(*ev), 0, NULL, type,
action, deconst_arg, socket,
action, deconst_arg, sock,
free_sevent, disp->sepool);
ev->result = ISC_R_UNSET;
ISC_LINK_INIT(ev, ev_link);
......@@ -1503,7 +1503,7 @@ static isc_result_t
startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
isc_result_t res;
isc_region_t region;
isc_socket_t *socket;
isc_socket_t *sock;
if (disp->shutting_down == 1)
return (ISC_R_SUCCESS);
......@@ -1522,10 +1522,10 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
return (ISC_R_SUCCESS);
if (dispsock != NULL)
socket = dispsock->socket;
sock = dispsock->socket;
else
socket = disp->socket;
INSIST(socket != NULL);
sock = disp->socket;
INSIST(sock != NULL);
switch (disp->socktype) {
/*
......@@ -1539,7 +1539,7 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
if (dispsock != NULL) {
isc_task_t *dt = dispsock->task;
isc_socketevent_t *sev =
allocate_sevent(disp, socket,
allocate_sevent(disp, sock,
ISC_SOCKEVENT_RECVDONE,
udp_exrecv, dispsock);
if (sev == NULL) {
......@@ -1547,7 +1547,7 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
return (ISC_R_NOMEMORY);
}
res = isc_socket_recv2(socket, &region, 1, dt, sev, 0);
res = isc_socket_recv2(sock, &region, 1, dt, sev, 0);
if (res != ISC_R_SUCCESS) {
free_buffer(disp, region.base, region.length);
return (res);
......@@ -1555,7 +1555,7 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
} else {
isc_task_t *dt = disp->task[0];
isc_socketevent_t *sev =
allocate_sevent(disp, socket,
allocate_sevent(disp, sock,
ISC_SOCKEVENT_RECVDONE,
udp_shrecv, disp);
if (sev == NULL) {
......@@ -1563,7 +1563,7 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
return (ISC_R_NOMEMORY);
}
res = isc_socket_recv2(socket, &region, 1, dt, sev, 0);
res = isc_socket_recv2(sock, &region, 1, dt, sev, 0);
if (res != ISC_R_SUCCESS) {
free_buffer(disp, region.base, region.length);
disp->shutdown_why = res;
......
......@@ -216,7 +216,7 @@ static void
check_config(const char *gss_name) {
const char *p;
krb5_context krb5_ctx;
char *krb5_realm = NULL;
char *krb5_realm_name = NULL;
if (strncasecmp(gss_name, "DNS/", 4) != 0) {
gss_log(ISC_LOG_ERROR, "tkey-gssapi-credential (%s) "
......@@ -228,7 +228,7 @@ check_config(const char *gss_name) {
gss_log(ISC_LOG_ERROR, "Unable to initialise krb5 context");
return;
}
if (krb5_get_default_realm(krb5_ctx, &krb5_realm) != 0) {
if (krb5_get_default_realm(krb5_ctx, &krb5_realm_name) != 0) {
gss_log(ISC_LOG_ERROR, "Unable to get krb5 default realm");
krb5_free_context(krb5_ctx);
return;
......@@ -240,10 +240,10 @@ check_config(const char *gss_name) {
krb5_free_context(krb5_ctx);
return;
}
if (strcasecmp(p + 1, krb5_realm) != 0) {
if (strcasecmp(p + 1, krb5_realm_name) != 0) {
gss_log(ISC_LOG_ERROR, "default realm from krb5.conf (%s) "
"does not match tkey-gssapi-credential (%s)",
krb5_realm, gss_name);
krb5_realm_name, gss_name);
krb5_free_context(krb5_ctx);
return;
}
......
......@@ -556,7 +556,7 @@ journal_file_create(isc_mem_t *mctx, const char *filename) {
}
static isc_result_t
journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t writable,
isc_boolean_t create, dns_journal_t **journalp)
{
FILE *fp = NULL;
......@@ -580,7 +580,7 @@ journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
if (j->filename == NULL)
FAIL(ISC_R_NOMEMORY);
result = isc_stdio_open(j->filename, write ? "rb+" : "rb", &fp);
result = isc_stdio_open(j->filename, writable ? "rb+" : "rb", &fp);
if (result == ISC_R_FILENOTFOUND) {
if (create) {
......@@ -670,7 +670,7 @@ journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
dns_decompress_init(&j->it.dctx, -1, DNS_DECOMPRESS_NONE);
j->state =
write ? JOURNAL_STATE_WRITE : JOURNAL_STATE_READ;
writable ? JOURNAL_STATE_WRITE : JOURNAL_STATE_READ;
*journalp = j;
return (ISC_R_SUCCESS);
......@@ -697,12 +697,12 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, unsigned int mode,
isc_result_t result;
size_t namelen;
char backup[1024];
isc_boolean_t write, create;
isc_boolean_t writable, create;
create = ISC_TF(mode & DNS_JOURNAL_CREATE);
write = ISC_TF(mode & (DNS_JOURNAL_WRITE|DNS_JOURNAL_CREATE));
writable = ISC_TF(mode & (DNS_JOURNAL_WRITE|DNS_JOURNAL_CREATE));
result = journal_open(mctx, filename, write, create, journalp);
result = journal_open(mctx, filename, writable, create, journalp);
if (result == ISC_R_NOTFOUND) {
namelen = strlen(filename);
if (namelen > 4U && strcmp(filename + namelen - 4, ".jnl") == 0)
......@@ -712,7 +712,8 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, unsigned int mode,
(int)namelen, filename);
if (result != ISC_R_SUCCESS)
return (result);
result = journal_open(mctx, backup, write, write, journalp);
result = journal_open(mctx, backup, writable, writable,
journalp);
}
return (result);
}
......
......@@ -306,7 +306,7 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
unsigned char newbuf[DNS_NSEC3PARAM_BUFFERSIZE];
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdata_nsec3param_t nsec3param;
isc_boolean_t remove, init, nonsec;
isc_boolean_t delete, init, nonsec;
isc_buffer_t b;
if (!dns_nsec3param_fromprivate(private, &rdata, nsec3buf,
......@@ -315,7 +315,7 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
CHECK(dns_rdata_tostruct(&rdata, &nsec3param, NULL));
remove = ISC_TF((nsec3param.flags & DNS_NSEC3FLAG_REMOVE) != 0);
delete = ISC_TF((nsec3param.flags & DNS_NSEC3FLAG_REMOVE) != 0);
init = ISC_TF((nsec3param.flags & DNS_NSEC3FLAG_INITIAL) != 0);
nonsec = ISC_TF((nsec3param.flags & DNS_NSEC3FLAG_NONSEC) != 0);
......@@ -326,7 +326,7 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
if (init)
isc_buffer_putstr(buf, "Pending NSEC3 chain ");
else if (remove)
else if (delete)
isc_buffer_putstr(buf, "Removing NSEC3 chain ");
else
isc_buffer_putstr(buf, "Creating NSEC3 chain ");
......@@ -339,18 +339,18 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
CHECK(dns_rdata_totext(&rdata, NULL, buf));
if (remove && !nonsec)
if (delete && !nonsec)
isc_buffer_putstr(buf, " / creating NSEC chain");
} else if (private->length == 5) {
unsigned char alg = private->data[0];
dns_keytag_t keyid = (private->data[2] | private->data[1] << 8);
char keybuf[BUFSIZ], algbuf[DNS_SECALG_FORMATSIZE];
isc_boolean_t remove = ISC_TF(private->data[3] != 0);
isc_boolean_t delete = ISC_TF(private->data[3] != 0);
isc_boolean_t complete = ISC_TF(private->data[4] != 0);
if (remove && complete)
if (delete && complete)
isc_buffer_putstr(buf, "Done removing signatures for ");
else if (remove)
else if (delete)
isc_buffer_putstr(buf, "Removing signatures for ");
else if (complete)
isc_buffer_putstr(buf, "Done signing with ");
......
......@@ -839,7 +839,7 @@ typedef struct rbtdb_dbiterator {
static void free_rbtdb(dns_rbtdb_t *rbtdb, isc_boolean_t log,
isc_event_t *event);
static void overmem(dns_db_t *db, isc_boolean_t overmem);
static void overmem(dns_db_t *db, isc_boolean_t over);
static void setnsec3parameters(dns_db_t *db, rbtdb_version_t *version);
/* Pad to 32 bytes */
......@@ -1042,10 +1042,10 @@ resign_sooner(void *v1, void *v2) {
* This function sets the heap index into the header.
*/
static void
set_index(void *what, unsigned int index) {
set_index(void *what, unsigned int idx) {
rdatasetheader_t *h = what;
h->heap_index = index;
h->heap_index = idx;
}
/*%
......@@ -5591,11 +5591,11 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
}
static void
overmem(dns_db_t *db, isc_boolean_t overmem) {
overmem(dns_db_t *db, isc_boolean_t over) {
/* This is an empty callback. See adb.c:water() */
UNUSED(db);
UNUSED(overmem);
UNUSED(over);
return;
}
......
......@@ -98,7 +98,7 @@ totext_keydata(ARGS_TOTEXT) {
char buf[sizeof("64000")];
unsigned int flags;
unsigned char algorithm;
unsigned long refresh, add, remove;
unsigned long refresh, add, delete;
char algbuf[DNS_NAME_FORMATSIZE];
const char *keyinfo;
......@@ -122,9 +122,9 @@ totext_keydata(ARGS_TOTEXT) {
RETERR(str_totext(" ", target));
/* remove hold-down */
remove = uint32_fromregion(&sr);
delete = uint32_fromregion(&sr);
isc_region_consume(&sr, 4);
RETERR(dns_time32_totext(remove, target));
RETERR(dns_time32_totext(delete, target));
RETERR(str_totext(" ", target));
/* flags */
......@@ -224,11 +224,11 @@ totext_keydata(ARGS_TOTEXT) {
RETERR(str_totext(abuf, target));
}
if (remove != 0U) {
if (delete != 0U) {
RETERR(str_totext(tctx->linebreak, target));
RETERR(str_totext("; removal pending: ",
target));
isc_time_set(&t, remove, 0);
isc_time_set(&t, delete, 0);
isc_time_formathttptimestamp(&t, dbuf,
sizeof(dbuf));
RETERR(str_totext(dbuf, target));
......
......@@ -95,16 +95,16 @@ totext_soa(ARGS_TOTEXT) {
isc_boolean_t sub;
int i;
isc_boolean_t multiline;
isc_boolean_t comment;
isc_boolean_t comm;
REQUIRE(rdata->type == 6);
REQUIRE(rdata->length != 0);
multiline = ISC_TF((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0);
if (multiline)
comment = ISC_TF((tctx->flags & DNS_STYLEFLAG_RRCOMMENT) != 0);
comm = ISC_TF((tctx->flags & DNS_STYLEFLAG_RRCOMMENT) != 0);
else
comment = ISC_FALSE;
comm = ISC_FALSE;
dns_name_init(&mname, NULL);
......@@ -136,9 +136,9 @@ totext_soa(ARGS_TOTEXT) {
unsigned long num;
num = uint32_fromregion(&dregion);
isc_region_consume(&dregion, 4);
sprintf(buf, comment ? "%-10lu ; " : "%lu", num);
sprintf(buf, comm ? "%-10lu ; " : "%lu", num);
RETERR(str_totext(buf, target));
if (comment) {
if (comm) {
RETERR(str_totext(soa_fieldnames[i], target));
/* Print times in week/day/hour/minute/second form */
if (i >= 1) {
......
......@@ -145,7 +145,7 @@ dns_requestmgr_create(isc_mem_t *mctx,
dns_requestmgr_t **requestmgrp)
{
dns_requestmgr_t *requestmgr;
isc_socket_t *socket;
isc_socket_t *sock;
isc_result_t result;
int i;
unsigned int dispattr;
......@@ -157,7 +157,7 @@ dns_requestmgr_create(isc_mem_t *mctx,
REQUIRE(socketmgr != NULL);
REQUIRE(taskmgr != NULL);
REQUIRE(dispatchmgr != NULL);
UNUSED(socket);
UNUSED(sock);
if (dispatchv4 != NULL) {
dispattr = dns_dispatch_getattributes(dispatchv4);
REQUIRE((dispattr & DNS_DISPATCHATTR_UDP) != 0);
......@@ -427,21 +427,21 @@ mgr_gethash(dns_requestmgr_t *requestmgr) {
static inline isc_result_t
req_send(dns_request_t *request, isc_task_t *task, isc_sockaddr_t *address) {
isc_region_t r;
isc_socket_t *socket;
isc_socket_t *sock;
isc_socketevent_t *sendevent;
isc_result_t result;
req_log(ISC_LOG_DEBUG(3), "req_send: request %p", request);
REQUIRE(VALID_REQUEST(request));
socket = req_getsocket(request);
sock = req_getsocket(request);
isc_buffer_usedregion(request->query, &r);
/*
* We could connect the socket when we are using an exclusive dispatch
* as we do in resolver.c, but we prefer implementation simplicity
* at this moment.
*/
sendevent = isc_socket_socketevent(request->mctx, socket,
sendevent = isc_socket_socketevent(request->mctx, sock,
ISC_SOCKEVENT_SENDDONE,
req_senddone, request);
if (sendevent == NULL)
......@@ -454,7 +454,7 @@ req_send(dns_request_t *request, isc_task_t *task, isc_sockaddr_t *address) {
sendevent->dscp = request->dscp;
}
result = isc_socket_sendto2(socket, &r, task, address, NULL,
result = isc_socket_sendto2(sock, &r, task, address, NULL,