Commit f4c1681d authored by Mark Andrews's avatar Mark Andrews
Browse files

silence coverity false positive. [RT #46841]

(cherry picked from commit fa22351a)
parent 416b1cec
......@@ -157,7 +157,7 @@ enum {
NS_QUERY_SETUP_QCTX_INITIALIZED,
NS_QUERY_LOOKUP_BEGIN,
NS_QUERY_DONE_BEGIN,
NS_QUERY_HOOKS_COUNT
NS_QUERY_HOOKS_COUNT /* MUST BE LAST */
};
typedef isc_boolean_t
......
......@@ -680,7 +680,7 @@ extract_qctx(void *hook_data, void *callback_data, isc_result_t *resultp) {
static isc_result_t
create_qctx_for_client(ns_client_t *client, query_ctx_t **qctxp) {
ns_hook_t *saved_hook_table;
ns_hook_t query_hooks[NS_QUERY_HOOKS_COUNT] = {
ns_hook_t query_hooks[NS_QUERY_HOOKS_COUNT + 1] = {
[NS_QUERY_SETUP_QCTX_INITIALIZED] = {
.callback = extract_qctx,
.callback_data = qctxp,
......
......@@ -57,7 +57,7 @@ ns__query_sfcache_test(const ns__query_sfcache_test_params_t *test) {
/*
* Interrupt execution if query_done() is called.
*/
ns_hook_t query_hooks[NS_QUERY_HOOKS_COUNT] = {
ns_hook_t query_hooks[NS_QUERY_HOOKS_COUNT + 1] = {
[NS_QUERY_DONE_BEGIN] = {
.callback = ns_test_hook_catch_call,
.callback_data = NULL,
......@@ -264,7 +264,7 @@ ns__query_start_test(const ns__query_start_test_params_t *test) {
/*
* Interrupt execution if query_lookup() or query_done() is called.
*/
ns_hook_t query_hooks[NS_QUERY_HOOKS_COUNT] = {
ns_hook_t query_hooks[NS_QUERY_HOOKS_COUNT + 1] = {
[NS_QUERY_LOOKUP_BEGIN] = {
.callback = ns_test_hook_catch_call,
.callback_data = 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