Apply suggestions from code review

Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Signed-off-by: benierc <clement.benier@iot.bzh>
This commit is contained in:
benierc 2025-04-22 15:57:57 +02:00 committed by poiana
parent 186614dff4
commit 543734af3c

View File

@ -37,7 +37,7 @@ bool falco::outputs::output_http::init(const config &oc,
m_curl = nullptr;
m_http_headers = nullptr;
m_max_consecutive_timeouts =
static_cast<uint8_t>(std::stoi(m_oc.options["max_consecutive_timeouts"]));
static_cast<uint8_t>(std::stoi(m_oc.options["max_consecutive_timeouts"]) & 0xFF);
CURLcode res = CURLE_FAILED_INIT;
m_curl = curl_easy_init();
@ -105,7 +105,7 @@ bool falco::outputs::output_http::init(const config &oc,
void falco::outputs::output_http::output(const message *msg) {
CURLcode res = curl_easy_setopt(m_curl, CURLOPT_POSTFIELDS, msg->msg.c_str());
uint32_t curl_easy_platform_calls = 0;
uint8_t curl_easy_platform_calls = 0;
if(res == CURLE_OK) {
do {