mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
De-duplicate __FILE__, __LINE__
Mostly generated automatically with the following semantic patch, except where coccinelle was confused by #ifdef in lib/isc/net.c @@ expression list args; @@ - UNEXPECTED_ERROR(__FILE__, __LINE__, args) + UNEXPECTED_ERROR(args) @@ expression list args; @@ - FATAL_ERROR(__FILE__, __LINE__, args) + FATAL_ERROR(args)
This commit is contained in:
parent
cf230dea7a
commit
ec50c58f52
@ -531,8 +531,7 @@ dlz_dlopen_init(isc_mem_t *mctx) {
|
|||||||
mctx, &dlz_dlopen);
|
mctx, &dlz_dlopen);
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("dns_sdlzregister() failed: %s",
|
||||||
"dns_sdlzregister() failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
}
|
}
|
||||||
|
@ -1406,8 +1406,7 @@ named_smf_get_instance(char **ins_name, int debug, isc_mem_t *mctx) {
|
|||||||
|
|
||||||
if ((h = scf_handle_create(SCF_VERSION)) == NULL) {
|
if ((h = scf_handle_create(SCF_VERSION)) == NULL) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("scf_handle_create() failed: %s",
|
||||||
"scf_handle_create() failed: %s",
|
|
||||||
scf_strerror(scf_error()));
|
scf_strerror(scf_error()));
|
||||||
}
|
}
|
||||||
return (ISC_R_FAILURE);
|
return (ISC_R_FAILURE);
|
||||||
@ -1415,8 +1414,7 @@ named_smf_get_instance(char **ins_name, int debug, isc_mem_t *mctx) {
|
|||||||
|
|
||||||
if (scf_handle_bind(h) == -1) {
|
if (scf_handle_bind(h) == -1) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("scf_handle_bind() failed: %s",
|
||||||
"scf_handle_bind() failed: %s",
|
|
||||||
scf_strerror(scf_error()));
|
scf_strerror(scf_error()));
|
||||||
}
|
}
|
||||||
scf_handle_destroy(h);
|
scf_handle_destroy(h);
|
||||||
@ -1425,8 +1423,7 @@ named_smf_get_instance(char **ins_name, int debug, isc_mem_t *mctx) {
|
|||||||
|
|
||||||
if ((namelen = scf_myname(h, NULL, 0)) == -1) {
|
if ((namelen = scf_myname(h, NULL, 0)) == -1) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("scf_myname() failed: %s",
|
||||||
"scf_myname() failed: %s",
|
|
||||||
scf_strerror(scf_error()));
|
scf_strerror(scf_error()));
|
||||||
}
|
}
|
||||||
scf_handle_destroy(h);
|
scf_handle_destroy(h);
|
||||||
@ -1434,8 +1431,7 @@ named_smf_get_instance(char **ins_name, int debug, isc_mem_t *mctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((instance = isc_mem_allocate(mctx, namelen + 1)) == NULL) {
|
if ((instance = isc_mem_allocate(mctx, namelen + 1)) == NULL) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("named_smf_get_instance memory "
|
||||||
"named_smf_get_instance memory "
|
|
||||||
"allocation failed: %s",
|
"allocation failed: %s",
|
||||||
isc_result_totext(ISC_R_NOMEMORY));
|
isc_result_totext(ISC_R_NOMEMORY));
|
||||||
scf_handle_destroy(h);
|
scf_handle_destroy(h);
|
||||||
@ -1444,8 +1440,7 @@ named_smf_get_instance(char **ins_name, int debug, isc_mem_t *mctx) {
|
|||||||
|
|
||||||
if (scf_myname(h, instance, namelen + 1) == -1) {
|
if (scf_myname(h, instance, namelen + 1) == -1) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("scf_myname() failed: %s",
|
||||||
"scf_myname() failed: %s",
|
|
||||||
scf_strerror(scf_error()));
|
scf_strerror(scf_error()));
|
||||||
}
|
}
|
||||||
scf_handle_destroy(h);
|
scf_handle_destroy(h);
|
||||||
@ -1552,8 +1547,7 @@ main(int argc, char *argv[]) {
|
|||||||
result = named_smf_get_instance(&instance, 1, named_g_mctx);
|
result = named_smf_get_instance(&instance, 1, named_g_mctx);
|
||||||
if (result == ISC_R_SUCCESS && instance != NULL) {
|
if (result == ISC_R_SUCCESS && instance != NULL) {
|
||||||
if (smf_disable_instance(instance, 0) != 0) {
|
if (smf_disable_instance(instance, 0) != 0) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("smf_disable_instance() "
|
||||||
"smf_disable_instance() "
|
|
||||||
"failed for %s : %s",
|
"failed for %s : %s",
|
||||||
instance,
|
instance,
|
||||||
scf_strerror(scf_error()));
|
scf_strerror(scf_error()));
|
||||||
|
@ -4765,8 +4765,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||||||
maps, AF_INET6, &dispatch6, &dscp6,
|
maps, AF_INET6, &dispatch6, &dscp6,
|
||||||
(ISC_LIST_PREV(view, link) == NULL)));
|
(ISC_LIST_PREV(view, link) == NULL)));
|
||||||
if (dispatch4 == NULL && dispatch6 == NULL) {
|
if (dispatch4 == NULL && dispatch6 == NULL) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("unable to obtain either an IPv4 or"
|
||||||
"unable to obtain either an IPv4 or"
|
|
||||||
" an IPv6 dispatch");
|
" an IPv6 dispatch");
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -37,8 +37,7 @@ not, we call UNEXPECTED_ERROR(). E.g.
|
|||||||
|
|
||||||
void foo() {
|
void foo() {
|
||||||
if (some_unix_thang() < 0) {
|
if (some_unix_thang() < 0) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("some_unix_thang() failed: %s",
|
||||||
"some_unix_thang() failed: %s",
|
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
@ -471,8 +471,7 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
|
|||||||
if (taskmgr != NULL) {
|
if (taskmgr != NULL) {
|
||||||
result = isc_task_create(taskmgr, &cleaner->task, 0);
|
result = isc_task_create(taskmgr, &cleaner->task, 0);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_task_create() failed: %s",
|
||||||
"isc_task_create() failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup_iterator;
|
goto cleanup_iterator;
|
||||||
@ -534,8 +533,7 @@ begin_cleaning(cache_cleaner_t *cleaner) {
|
|||||||
* so there is nothing to be cleaned.
|
* so there is nothing to be cleaned.
|
||||||
*/
|
*/
|
||||||
if (result != ISC_R_NOMORE && cleaner->iterator != NULL) {
|
if (result != ISC_R_NOMORE && cleaner->iterator != NULL) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("cache cleaner: "
|
||||||
"cache cleaner: "
|
|
||||||
"dns_dbiterator_first() failed: %s",
|
"dns_dbiterator_first() failed: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
dns_dbiterator_destroy(&cleaner->iterator);
|
dns_dbiterator_destroy(&cleaner->iterator);
|
||||||
@ -674,10 +672,8 @@ incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
result = dns_dbiterator_current(cleaner->iterator, &node, NULL);
|
result = dns_dbiterator_current(cleaner->iterator, &node, NULL);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("cache cleaner: "
|
||||||
"cache cleaner: "
|
"dns_dbiterator_current() failed: %s",
|
||||||
"dns_dbiterator_current() "
|
|
||||||
"failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
|
|
||||||
end_cleaning(cleaner, event);
|
end_cleaning(cleaner, event);
|
||||||
@ -703,8 +699,7 @@ incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
|||||||
* keep trying to clean it, otherwise stop cleaning.
|
* keep trying to clean it, otherwise stop cleaning.
|
||||||
*/
|
*/
|
||||||
if (result != ISC_R_NOMORE) {
|
if (result != ISC_R_NOMORE) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("cache cleaner: "
|
||||||
"cache cleaner: "
|
|
||||||
"dns_dbiterator_next() "
|
"dns_dbiterator_next() "
|
||||||
"failed: %s",
|
"failed: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
@ -779,8 +774,7 @@ dns_cache_clean(dns_cache_t *cache, isc_stdtime_t now) {
|
|||||||
*/
|
*/
|
||||||
result = dns_db_expirenode(cache->db, node, now);
|
result = dns_db_expirenode(cache->db, node, now);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("cache cleaner: dns_db_expirenode() "
|
||||||
"cache cleaner: dns_db_expirenode() "
|
|
||||||
"failed: %s",
|
"failed: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
/*
|
/*
|
||||||
|
@ -176,8 +176,7 @@ dns_diff_appendminimal(dns_diff_t *diff, dns_difftuple_t **tuplep) {
|
|||||||
{
|
{
|
||||||
ISC_LIST_UNLINK(diff->tuples, ot, link);
|
ISC_LIST_UNLINK(diff->tuples, ot, link);
|
||||||
if ((*tuplep)->op == ot->op) {
|
if ((*tuplep)->op == ot->op) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("unexpected non-minimal diff");
|
||||||
"unexpected non-minimal diff");
|
|
||||||
} else {
|
} else {
|
||||||
dns_difftuple_free(tuplep);
|
dns_difftuple_free(tuplep);
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
|
|||||||
freenode:
|
freenode:
|
||||||
dns_db_detachnode(db, &node);
|
dns_db_detachnode(db, &node);
|
||||||
nonode:
|
nonode:
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "missing SOA");
|
UNEXPECTED_ERROR("missing SOA");
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,8 +445,7 @@ loadctx_destroy(dns_loadctx_t *lctx) {
|
|||||||
if (lctx->f != NULL) {
|
if (lctx->f != NULL) {
|
||||||
isc_result_t result = isc_stdio_close(lctx->f);
|
isc_result_t result = isc_stdio_close(lctx->f);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_stdio_close() failed: %s",
|
||||||
"isc_stdio_close() failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1281,8 +1280,7 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
}
|
}
|
||||||
dump_time = (isc_stdtime_t)dump_time64;
|
dump_time = (isc_stdtime_t)dump_time64;
|
||||||
if (dump_time != dump_time64) {
|
if (dump_time != dump_time64) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("%s: %s:%lu: $DATE "
|
||||||
"%s: %s:%lu: $DATE "
|
|
||||||
"outside epoch",
|
"outside epoch",
|
||||||
"dns_master_load",
|
"dns_master_load",
|
||||||
source, line);
|
source, line);
|
||||||
@ -1290,8 +1288,7 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
goto insist_and_cleanup;
|
goto insist_and_cleanup;
|
||||||
}
|
}
|
||||||
if (dump_time > current_time) {
|
if (dump_time > current_time) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("%s: %s:%lu: "
|
||||||
"%s: %s:%lu: "
|
|
||||||
"$DATE in future, "
|
"$DATE in future, "
|
||||||
"using current date",
|
"using current date",
|
||||||
"dns_master_load",
|
"dns_master_load",
|
||||||
@ -1570,8 +1567,7 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
ictx->drop = false;
|
ictx->drop = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("%s:%lu: isc_lex_gettoken() returned "
|
||||||
"%s:%lu: isc_lex_gettoken() returned "
|
|
||||||
"unexpected token type (%d)",
|
"unexpected token type (%d)",
|
||||||
source, line, token.type);
|
source, line, token.type);
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
@ -1663,8 +1659,7 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (token.type != isc_tokentype_string) {
|
if (token.type != isc_tokentype_string) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_lex_gettoken() returned "
|
||||||
"isc_lex_gettoken() returned "
|
|
||||||
"unexpected token type");
|
"unexpected token type");
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
if (MANYERRS(lctx, result)) {
|
if (MANYERRS(lctx, result)) {
|
||||||
@ -1685,8 +1680,7 @@ load_text(dns_loadctx_t *lctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (token.type != isc_tokentype_string) {
|
if (token.type != isc_tokentype_string) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_lex_gettoken() returned "
|
||||||
"isc_lex_gettoken() returned "
|
|
||||||
"unexpected token type");
|
"unexpected token type");
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
if (MANYERRS(lctx, result)) {
|
if (MANYERRS(lctx, result)) {
|
||||||
@ -2273,8 +2267,7 @@ load_header(dns_loadctx_t *lctx) {
|
|||||||
|
|
||||||
result = isc_stdio_read(data, 1, commonlen, lctx->f, NULL);
|
result = isc_stdio_read(data, 1, commonlen, lctx->f, NULL);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_stdio_read failed: %s",
|
||||||
"isc_stdio_read failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@ -2306,8 +2299,7 @@ load_header(dns_loadctx_t *lctx) {
|
|||||||
|
|
||||||
result = isc_stdio_read(data + commonlen, 1, remainder, lctx->f, NULL);
|
result = isc_stdio_read(data + commonlen, 1, remainder, lctx->f, NULL);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_stdio_read failed: %s",
|
||||||
"isc_stdio_read failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@ -2332,8 +2324,7 @@ openfile_raw(dns_loadctx_t *lctx, const char *master_file) {
|
|||||||
|
|
||||||
result = isc_stdio_open(master_file, "rb", &lctx->f);
|
result = isc_stdio_open(master_file, "rb", &lctx->f);
|
||||||
if (result != ISC_R_SUCCESS && result != ISC_R_FILENOTFOUND) {
|
if (result != ISC_R_SUCCESS && result != ISC_R_FILENOTFOUND) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_stdio_open() failed: %s",
|
||||||
"isc_stdio_open() failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -857,8 +857,7 @@ dns_rdataset_totext(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
result = totext_ctx_init(&dns_master_style_debug, NULL, &ctx);
|
result = totext_ctx_init(&dns_master_style_debug, NULL, &ctx);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("could not set master file style");
|
||||||
"could not set master file style");
|
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -890,8 +889,7 @@ dns_master_rdatasettotext(const dns_name_t *owner_name,
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
result = totext_ctx_init(style, indent, &ctx);
|
result = totext_ctx_init(style, indent, &ctx);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("could not set master file style");
|
||||||
"could not set master file style");
|
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -907,8 +905,7 @@ dns_master_questiontotext(const dns_name_t *owner_name,
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
result = totext_ctx_init(style, NULL, &ctx);
|
result = totext_ctx_init(style, NULL, &ctx);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("could not set master file style");
|
||||||
"could not set master file style");
|
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -983,8 +980,7 @@ dump_rdataset(isc_mem_t *mctx, const dns_name_t *name, dns_rdataset_t *rdataset,
|
|||||||
result = isc_stdio_write(r.base, 1, (size_t)r.length, f, NULL);
|
result = isc_stdio_write(r.base, 1, (size_t)r.length, f, NULL);
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("master file write failed: %s",
|
||||||
"master file write failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@ -1266,8 +1262,7 @@ restart:
|
|||||||
result = isc_stdio_write(r.base, 1, (size_t)r.length, f, NULL);
|
result = isc_stdio_write(r.base, 1, (size_t)r.length, f, NULL);
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("raw master file write failed: %s",
|
||||||
"raw master file write failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@ -1582,8 +1577,7 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||||||
|
|
||||||
result = totext_ctx_init(style, NULL, &dctx->tctx);
|
result = totext_ctx_init(style, NULL, &dctx->tctx);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("could not set master file style");
|
||||||
"could not set master file style");
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1973,8 +1967,7 @@ dns_master_dumpnodetostream(isc_mem_t *mctx, dns_db_t *db,
|
|||||||
|
|
||||||
result = totext_ctx_init(style, NULL, &ctx);
|
result = totext_ctx_init(style, NULL, &ctx);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("could not set master file style");
|
||||||
"could not set master file style");
|
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1058,8 +1058,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "Unexpected state %d",
|
FATAL_ERROR("Unexpected state %d", state);
|
||||||
state);
|
|
||||||
/* Does not return. */
|
/* Does not return. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1279,8 +1278,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
|
|||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FATAL_ERROR(__FILE__, __LINE__,
|
FATAL_ERROR("Unexpected label type %02x", count);
|
||||||
"Unexpected label type %02x", count);
|
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1402,8 +1400,7 @@ dns_name_tofilenametext(const dns_name_t *name, bool omit_final_dot,
|
|||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FATAL_ERROR(__FILE__, __LINE__,
|
FATAL_ERROR("Unexpected label type %02x", count);
|
||||||
"Unexpected label type %02x", count);
|
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1659,8 +1656,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source, dns_decompress_t dctx,
|
|||||||
state = fw_start;
|
state = fw_start;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "Unknown state %d",
|
FATAL_ERROR("Unknown state %d", state);
|
||||||
state);
|
|
||||||
/* Does not return. */
|
/* Does not return. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4426,7 +4426,7 @@ zone_findzonecut(dns_db_t *db, const dns_name_t *name, unsigned int options,
|
|||||||
UNUSED(rdataset);
|
UNUSED(rdataset);
|
||||||
UNUSED(sigrdataset);
|
UNUSED(sigrdataset);
|
||||||
|
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "zone_findzonecut() called!");
|
FATAL_ERROR("zone_findzonecut() called!");
|
||||||
|
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return (ISC_R_NOTIMPLEMENTED);
|
return (ISC_R_NOTIMPLEMENTED);
|
||||||
|
@ -4880,8 +4880,7 @@ fctx_create(dns_resolver_t *res, const dns_name_t *name, dns_rdatatype_t type,
|
|||||||
|
|
||||||
if (!dns_name_issubdomain(fctx->name, fctx->domain)) {
|
if (!dns_name_issubdomain(fctx->name, fctx->domain)) {
|
||||||
dns_name_format(fctx->domain, buf, sizeof(buf));
|
dns_name_format(fctx->domain, buf, sizeof(buf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("'%s' is not subdomain of '%s'", fctx->info,
|
||||||
"'%s' is not subdomain of '%s'", fctx->info,
|
|
||||||
buf);
|
buf);
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup_fcount;
|
goto cleanup_fcount;
|
||||||
@ -4897,8 +4896,7 @@ fctx_create(dns_resolver_t *res, const dns_name_t *name, dns_rdatatype_t type,
|
|||||||
res->query_timeout % 1000 * 1000000);
|
res->query_timeout % 1000 * 1000000);
|
||||||
iresult = isc_time_nowplusinterval(&fctx->expires, &interval);
|
iresult = isc_time_nowplusinterval(&fctx->expires, &interval);
|
||||||
if (iresult != ISC_R_SUCCESS) {
|
if (iresult != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_time_nowplusinterval: %s",
|
||||||
"isc_time_nowplusinterval: %s",
|
|
||||||
isc_result_totext(iresult));
|
isc_result_totext(iresult));
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup_qmessage;
|
goto cleanup_qmessage;
|
||||||
@ -4925,8 +4923,7 @@ fctx_create(dns_resolver_t *res, const dns_name_t *name, dns_rdatatype_t type,
|
|||||||
iresult = isc_time_nowplusinterval(&fctx->expires_try_stale,
|
iresult = isc_time_nowplusinterval(&fctx->expires_try_stale,
|
||||||
&interval);
|
&interval);
|
||||||
if (iresult != ISC_R_SUCCESS) {
|
if (iresult != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("isc_time_nowplusinterval: %s",
|
||||||
"isc_time_nowplusinterval: %s",
|
|
||||||
isc_result_totext(iresult));
|
isc_result_totext(iresult));
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup_timer;
|
goto cleanup_timer;
|
||||||
|
@ -207,7 +207,7 @@ dns_rpz_type2str(dns_rpz_type_t type) {
|
|||||||
case DNS_RPZ_TYPE_BAD:
|
case DNS_RPZ_TYPE_BAD:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "impossible rpz type %d", type);
|
FATAL_ERROR("impossible rpz type %d", type);
|
||||||
return ("impossible");
|
return ("impossible");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,8 +138,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, const char *name,
|
|||||||
view->zonetable = NULL;
|
view->zonetable = NULL;
|
||||||
result = dns_zt_create(mctx, rdclass, &view->zonetable);
|
result = dns_zt_create(mctx, rdclass, &view->zonetable);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("dns_zt_create() failed: %s",
|
||||||
"dns_zt_create() failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup_mutex;
|
goto cleanup_mutex;
|
||||||
@ -147,8 +146,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, const char *name,
|
|||||||
|
|
||||||
result = dns_fwdtable_create(mctx, &view->fwdtable);
|
result = dns_fwdtable_create(mctx, &view->fwdtable);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("dns_fwdtable_create() failed: %s",
|
||||||
"dns_fwdtable_create() failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup_zt;
|
goto cleanup_zt;
|
||||||
|
@ -5240,8 +5240,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "unexpected zone type %d",
|
UNEXPECTED_ERROR("unexpected zone type %d", zone->type);
|
||||||
zone->type);
|
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,6 @@ isc__condition_waituntil(pthread_cond_t *c, pthread_mutex_t *m, isc_time_t *t) {
|
|||||||
} while (presult == EINTR);
|
} while (presult == EINTR);
|
||||||
|
|
||||||
strerror_r(presult, strbuf, sizeof(strbuf));
|
strerror_r(presult, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("pthread_cond_timedwait() returned %s", strbuf);
|
||||||
"pthread_cond_timedwait() returned %s", strbuf);
|
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
@ -315,10 +315,10 @@ mock_assert(const int result, const char *const expression,
|
|||||||
#include <isc/error.h> /* Contractual promise. */
|
#include <isc/error.h> /* Contractual promise. */
|
||||||
#include <isc/strerr.h> /* for ISC_STRERRORSIZE */
|
#include <isc/strerr.h> /* for ISC_STRERRORSIZE */
|
||||||
|
|
||||||
/*% Unexpected Error */
|
#define UNEXPECTED_ERROR(...) \
|
||||||
#define UNEXPECTED_ERROR isc_error_unexpected
|
isc_error_unexpected(__FILE__, __LINE__, __VA_ARGS__)
|
||||||
/*% Fatal Error */
|
|
||||||
#define FATAL_ERROR isc_error_fatal
|
#define FATAL_ERROR(...) isc_error_fatal(__FILE__, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#ifdef UNIT_TESTING
|
#ifdef UNIT_TESTING
|
||||||
|
|
||||||
@ -329,7 +329,6 @@ mock_assert(const int result, const char *const expression,
|
|||||||
|
|
||||||
#else /* UNIT_TESTING */
|
#else /* UNIT_TESTING */
|
||||||
|
|
||||||
/*% Runtime Check */
|
|
||||||
#define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
|
#define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
|
||||||
|
|
||||||
#endif /* UNIT_TESTING */
|
#endif /* UNIT_TESTING */
|
||||||
|
@ -202,8 +202,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
|
|||||||
|
|
||||||
if (getifaddrs(&iter->ifaddrs) < 0) {
|
if (getifaddrs(&iter->ifaddrs) < 0) {
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("getting interface addresses: getifaddrs: %s",
|
||||||
"getting interface addresses: getifaddrs: %s",
|
|
||||||
strbuf);
|
strbuf);
|
||||||
result = ISC_R_UNEXPECTED;
|
result = ISC_R_UNEXPECTED;
|
||||||
goto failure;
|
goto failure;
|
||||||
|
@ -902,8 +902,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||||||
remaining--;
|
remaining--;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "Unexpected state %d",
|
FATAL_ERROR("Unexpected state %d", state);
|
||||||
state);
|
|
||||||
}
|
}
|
||||||
} while (!done);
|
} while (!done);
|
||||||
|
|
||||||
|
@ -1249,10 +1249,9 @@ isc__mempool_destroy(isc_mempool_t **restrict mpctxp FLARG) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mpctx->allocated > 0) {
|
if (mpctx->allocated > 0) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR(
|
||||||
"isc_mempool_destroy(): mempool %s "
|
"isc_mempool_destroy(): mempool %s leaked memory",
|
||||||
"leaked memory",
|
mpctx->name);
|
||||||
mpctx->name);
|
|
||||||
}
|
}
|
||||||
REQUIRE(mpctx->allocated == 0);
|
REQUIRE(mpctx->allocated == 0);
|
||||||
|
|
||||||
|
@ -142,8 +142,7 @@ try_proto(int domain) {
|
|||||||
return (ISC_R_NOTFOUND);
|
return (ISC_R_NOTFOUND);
|
||||||
default:
|
default:
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("socket() failed: %s", strbuf);
|
||||||
"socket() failed: %s", strbuf);
|
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -241,8 +240,7 @@ try_ipv6only(void) {
|
|||||||
s = socket(PF_INET6, SOCK_STREAM, 0);
|
s = socket(PF_INET6, SOCK_STREAM, 0);
|
||||||
if (s == -1) {
|
if (s == -1) {
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "socket() failed: %s",
|
UNEXPECTED_ERROR("socket() failed: %s", strbuf);
|
||||||
strbuf);
|
|
||||||
ipv6only_result = ISC_R_UNEXPECTED;
|
ipv6only_result = ISC_R_UNEXPECTED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -259,8 +257,7 @@ try_ipv6only(void) {
|
|||||||
s = socket(PF_INET6, SOCK_DGRAM, 0);
|
s = socket(PF_INET6, SOCK_DGRAM, 0);
|
||||||
if (s == -1) {
|
if (s == -1) {
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "socket() failed: %s",
|
UNEXPECTED_ERROR("socket() failed: %s", strbuf);
|
||||||
strbuf);
|
|
||||||
ipv6only_result = ISC_R_UNEXPECTED;
|
ipv6only_result = ISC_R_UNEXPECTED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -302,8 +299,7 @@ try_ipv6pktinfo(void) {
|
|||||||
s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP);
|
s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP);
|
||||||
if (s == -1) {
|
if (s == -1) {
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "socket() failed: %s",
|
UNEXPECTED_ERROR("socket() failed: %s", strbuf);
|
||||||
strbuf);
|
|
||||||
ipv6pktinfo_result = ISC_R_UNEXPECTED;
|
ipv6pktinfo_result = ISC_R_UNEXPECTED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -422,13 +418,12 @@ make_nonblock(int fd) {
|
|||||||
|
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
|
||||||
#ifdef USE_FIONBIO_IOCTL
|
#ifdef USE_FIONBIO_IOCTL
|
||||||
"ioctl(%d, FIONBIO, &on): %s", fd,
|
UNEXPECTED_ERROR("ioctl(%d, FIONBIO, &on): %s", fd, strbuf);
|
||||||
#else /* ifdef USE_FIONBIO_IOCTL */
|
#else /* ifdef USE_FIONBIO_IOCTL */
|
||||||
"fcntl(%d, F_SETFL, %d): %s", fd, flags,
|
UNEXPECTED_ERROR("fcntl(%d, F_SETFL, %d): %s", fd, flags,
|
||||||
#endif /* ifdef USE_FIONBIO_IOCTL */
|
|
||||||
strbuf);
|
strbuf);
|
||||||
|
#endif /* ifdef USE_FIONBIO_IOCTL */
|
||||||
|
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
@ -509,7 +504,6 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
|
|||||||
|
|
||||||
if (sendmsg(s, &msg, 0) < 0) {
|
if (sendmsg(s, &msg, 0) < 0) {
|
||||||
int debug = ISC_LOG_DEBUG(10);
|
int debug = ISC_LOG_DEBUG(10);
|
||||||
const char *typestr;
|
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
#ifdef ENOPROTOOPT
|
#ifdef ENOPROTOOPT
|
||||||
case ENOPROTOOPT:
|
case ENOPROTOOPT:
|
||||||
@ -529,11 +523,10 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
|
|||||||
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
|
ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
|
||||||
"sendmsg: %s", strbuf);
|
"sendmsg: %s", strbuf);
|
||||||
} else {
|
} else {
|
||||||
typestr = (type == IP_TOS) ? "IP_TOS" : "IPV6_TCLASS";
|
UNEXPECTED_ERROR(
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
"probing sendmsg() with %s=%02x failed: %s",
|
||||||
"probing "
|
(type == IP_TOS) ? "IP_TOS" : "IPV6_TCLASS",
|
||||||
"sendmsg() with %s=%02x failed: %s",
|
dscp, strbuf);
|
||||||
typestr, dscp, strbuf);
|
|
||||||
}
|
}
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
@ -224,8 +224,7 @@ isc___rwlock_init(isc__rwlock_t *rwl, unsigned int read_quota,
|
|||||||
rwl->readers_waiting = 0;
|
rwl->readers_waiting = 0;
|
||||||
atomic_init(&rwl->write_granted, 0);
|
atomic_init(&rwl->write_granted, 0);
|
||||||
if (read_quota != 0) {
|
if (read_quota != 0) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("read quota is not supported");
|
||||||
"read quota is not supported");
|
|
||||||
}
|
}
|
||||||
if (write_quota == 0) {
|
if (write_quota == 0) {
|
||||||
write_quota = RWLOCK_DEFAULT_WRITE_QUOTA;
|
write_quota = RWLOCK_DEFAULT_WRITE_QUOTA;
|
||||||
|
@ -234,8 +234,7 @@ isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, bool address_only) {
|
|||||||
p = ntohs(sockaddr->type.sin6.sin6_port);
|
p = ntohs(sockaddr->type.sin6.sin6_port);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("unknown address family: %d",
|
||||||
"unknown address family: %d",
|
|
||||||
(int)sockaddr->type.sa.sa_family);
|
(int)sockaddr->type.sa.sa_family);
|
||||||
s = (const unsigned char *)&sockaddr->type;
|
s = (const unsigned char *)&sockaddr->type;
|
||||||
length = sockaddr->length;
|
length = sockaddr->length;
|
||||||
@ -341,7 +340,7 @@ isc_sockaddr_pf(const isc_sockaddr_t *sockaddr) {
|
|||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
return (PF_INET6);
|
return (PF_INET6);
|
||||||
default:
|
default:
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "unknown address family: %d",
|
FATAL_ERROR("unknown address family: %d",
|
||||||
(int)sockaddr->type.sa.sa_family);
|
(int)sockaddr->type.sa.sa_family);
|
||||||
}
|
}
|
||||||
#endif /* if (AF_INET == PF_INET && AF_INET6 == PF_INET6) */
|
#endif /* if (AF_INET == PF_INET && AF_INET6 == PF_INET6) */
|
||||||
@ -380,7 +379,7 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port) {
|
|||||||
sockaddr->type.sin6.sin6_port = htons(port);
|
sockaddr->type.sin6.sin6_port = htons(port);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "unknown address family: %d",
|
FATAL_ERROR("unknown address family: %d",
|
||||||
(int)sockaddr->type.sa.sa_family);
|
(int)sockaddr->type.sa.sa_family);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -397,7 +396,7 @@ isc_sockaddr_getport(const isc_sockaddr_t *sockaddr) {
|
|||||||
port = ntohs(sockaddr->type.sin6.sin6_port);
|
port = ntohs(sockaddr->type.sin6.sin6_port);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FATAL_ERROR(__FILE__, __LINE__, "unknown address family: %d",
|
FATAL_ERROR("unknown address family: %d",
|
||||||
(int)sockaddr->type.sa.sa_family);
|
(int)sockaddr->type.sa.sa_family);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ time_now(isc_time_t *t, clockid_t clock) {
|
|||||||
if (clock_gettime(clock, &ts) == -1) {
|
if (clock_gettime(clock, &ts) == -1) {
|
||||||
char strbuf[ISC_STRERRORSIZE];
|
char strbuf[ISC_STRERRORSIZE];
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "%s", strbuf);
|
UNEXPECTED_ERROR("%s", strbuf);
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ isc_time_nowplusinterval(isc_time_t *t, const isc_interval_t *i) {
|
|||||||
if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
|
if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
|
||||||
char strbuf[ISC_STRERRORSIZE];
|
char strbuf[ISC_STRERRORSIZE];
|
||||||
strerror_r(errno, strbuf, sizeof(strbuf));
|
strerror_r(errno, strbuf, sizeof(strbuf));
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "%s", strbuf);
|
UNEXPECTED_ERROR("%s", strbuf);
|
||||||
return (ISC_R_UNEXPECTED);
|
return (ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,8 +209,7 @@ isc__tls_initialize(void) {
|
|||||||
|
|
||||||
/* Protect ourselves against unseeded PRNG */
|
/* Protect ourselves against unseeded PRNG */
|
||||||
if (RAND_status() != 1) {
|
if (RAND_status() != 1) {
|
||||||
FATAL_ERROR(__FILE__, __LINE__,
|
FATAL_ERROR("OpenSSL pseudorandom number generator "
|
||||||
"OpenSSL pseudorandom number generator "
|
|
||||||
"cannot be initialized (see the `PRNG not "
|
"cannot be initialized (see the `PRNG not "
|
||||||
"seeded' message in the OpenSSL FAQ)");
|
"seeded' message in the OpenSSL FAQ)");
|
||||||
}
|
}
|
||||||
|
@ -1319,8 +1319,7 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (result != ISC_R_NOMORE) {
|
if (result != ISC_R_NOMORE) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR("interface iteration failed: %s",
|
||||||
"interface iteration failed: %s",
|
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
} else {
|
} else {
|
||||||
result = ((tried_listening && all_addresses_in_use)
|
result = ((tried_listening && all_addresses_in_use)
|
||||||
|
@ -173,10 +173,9 @@ ns_sortlist_byaddrsetup(dns_acl_t *sortlist_acl, dns_aclenv_t *env,
|
|||||||
*orderp = NULL;
|
*orderp = NULL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR(
|
||||||
"unexpected return from ns_sortlist_setup(): "
|
"unexpected return from ns_sortlist_setup(): %d",
|
||||||
"%d",
|
sortlisttype);
|
||||||
sortlisttype);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2745,10 +2745,9 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||||||
/* "temp<rr.name, rr.type> += rr;" */
|
/* "temp<rr.name, rr.type> += rr;" */
|
||||||
result = temp_append(&temp, name, &rdata);
|
result = temp_append(&temp, name, &rdata);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
UNEXPECTED_ERROR(
|
||||||
"temp entry creation failed: "
|
"temp entry creation failed: %s",
|
||||||
"%s",
|
isc_result_totext(result));
|
||||||
isc_result_totext(result));
|
|
||||||
FAIL(ISC_R_UNEXPECTED);
|
FAIL(ISC_R_UNEXPECTED);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user