]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4191: kaizen: remove redundant semicolum and add explicit cast
authorYehor Velykozhon -X (yvelykoz - SOFTSERVE INC at Cisco) <yvelykoz@cisco.com>
Fri, 9 Feb 2024 10:10:39 +0000 (10:10 +0000)
committerOleksii. Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Fri, 9 Feb 2024 10:10:39 +0000 (10:10 +0000)
Merge in SNORT/snort3 from ~YVELYKOZ/snort3:fix_cppchecks_kaizen to master

Squashed commit of the following:

commit a7e95f4068b1a38923be160c74aeac5e1e19298d
Author: Yehor Velykozhon <yvelykoz@cisco.com>
Date:   Thu Feb 1 16:12:57 2024 +0200

    kaizen: remove redundant semicolon and add explicit cast

src/network_inspectors/kaizen/kaizen_inspector.cc
src/network_inspectors/kaizen/kaizen_inspector.h

index 559e30db6d057b5de678bb7475f4803a896e284c..5bd0a6650615f6e0ed37fd9edebc326ecaee9eff 100644 (file)
@@ -93,7 +93,7 @@ void HttpBodyHandler::handle(DataEvent& de, Flow*)
     kaizen_stats.client_body_bytes += body_len;
 
     debug_logf(kaizen_trace, TRACE_CLASSIFIER, nullptr, "input (body): %.*s\n", body_len, body);
-    debug_logf(kaizen_trace, TRACE_CLASSIFIER, nullptr, "output: %f\n", output);
+    debug_logf(kaizen_trace, TRACE_CLASSIFIER, nullptr, "output: %f\n", static_cast<double>(output));
 
     if ((double)output > config.http_param_threshold)
     {
@@ -148,7 +148,7 @@ void HttpUriHandler::handle(DataEvent& de, Flow*)
     kaizen_stats.uri_bytes += query_len;
 
     debug_logf(kaizen_trace, TRACE_CLASSIFIER, nullptr, "input (query): %.*s\n", query_len, query);
-    debug_logf(kaizen_trace, TRACE_CLASSIFIER, nullptr, "output: %f\n", output);
+    debug_logf(kaizen_trace, TRACE_CLASSIFIER, nullptr, "output: %f\n", static_cast<double>(output));
 
     if ((double)output > config.http_param_threshold)
     {
index 90dcf7e5d9eed199094ad699debe0ecf5e65cb2e..d54d72a62ffbf33ee8a326e5f7f5013db1e4cbdc 100644 (file)
@@ -30,7 +30,7 @@
 class Kaizen : public snort::Inspector
 {
 public:
-    Kaizen(const KaizenConfig& c) : config(c) { };
+    Kaizen(const KaizenConfig& c) : config(c) { }
 
     void show(const snort::SnortConfig*) const override;
     void eval(snort::Packet*) override {}