diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2022-05-31 09:19:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 09:19:14 +0300 |
commit | 46bdf0b4ceac28866c4345cf972c326b7a2f845e (patch) | |
tree | 44b4ceb45eac9bd0d2b8397dbedbbab0aa308f6e /aclk | |
parent | 4330eaaf115066c51bad64829fb7ac558892014f (diff) |
Fix coverity issue 378617,378615 (#13021)
* Fix CID 378617
* Fix CID 378615
* Make sure the ST rrdr lock indicator is set/reset while holding a lock
* Switch to int
Diffstat (limited to 'aclk')
-rw-r--r-- | aclk/aclk_query.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aclk/aclk_query.c b/aclk/aclk_query.c index 502272057d..5371673c1a 100644 --- a/aclk/aclk_query.c +++ b/aclk/aclk_query.c @@ -112,9 +112,9 @@ static int http_api_v2(struct aclk_query_thread *query_thr, aclk_query_t query) now_realtime_timeval(&w->tv_ready); if (query->timeout) { - double in_queue = (int)dt_usec(&w->tv_in, &w->tv_ready) / 1000; + int in_queue = (int) (dt_usec(&w->tv_in, &w->tv_ready) / 1000); if (in_queue > query->timeout) { - log_access("QUERY CANCELED: QUEUE TIME EXCEEDED %0.2f ms (LIMIT %d ms)", in_queue, query->timeout); + log_access("QUERY CANCELED: QUEUE TIME EXCEEDED %d ms (LIMIT %d ms)", in_queue, query->timeout); retval = 1; w->response.code = HTTP_RESP_BACKEND_FETCH_FAILED; aclk_http_msg_v2_err(query_thr->client, query->callback_topic, query->msg_id, w->response.code, CLOUD_EC_SND_TIMEOUT, CLOUD_EMSG_SND_TIMEOUT, NULL, 0); |