]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
log/anomaly: remove leading underscore from static var
authorJeff Lucovsky <jeff@lucovsky.org>
Sat, 5 Oct 2019 13:57:18 +0000 (09:57 -0400)
committerVictor Julien <victor@inliniac.net>
Wed, 9 Oct 2019 14:12:03 +0000 (16:12 +0200)
src/output-json-anomaly.c

index ad9554ef0a0243b11e2a9c00e2685c406b5bf11d..8b754087ba0af55dcec272249f4d585c85fbad65 100644 (file)
@@ -367,8 +367,8 @@ static void SetFlag(const ConfNode *conf, const char *name, uint16_t flag, uint1
 static void JsonAnomalyLogConf(AnomalyJsonOutputCtx *json_output_ctx,
         ConfNode *conf)
 {
-    static bool _warn_no_flags = false;
-    static bool _warn_no_packet = false;
+    static bool warn_no_flags = false;
+    static bool warn_no_packet = false;
     uint16_t flags = ANOMALY_DEFAULTS;
     if (conf != NULL) {
         /* Check for metadata to enable/disable. */
@@ -380,17 +380,17 @@ static void JsonAnomalyLogConf(AnomalyJsonOutputCtx *json_output_ctx,
         }
         SetFlag(conf, "packethdr", LOG_JSON_PACKETHDR, &flags);
     }
-    if (((flags & (LOG_JSON_DECODE_TYPE | LOG_JSON_PACKETHDR)) == LOG_JSON_PACKETHDR) && !_warn_no_packet) {
+    if (((flags & (LOG_JSON_DECODE_TYPE | LOG_JSON_PACKETHDR)) == LOG_JSON_PACKETHDR) && !warn_no_packet) {
         SCLogWarning(SC_WARN_ANOMALY_CONFIG, "Anomaly logging configured to include packet headers, however decode "
                      "type logging has not been selected. Packet headers will not be logged.");
-        _warn_no_packet = true;
+        warn_no_packet = true;
         flags &= ~LOG_JSON_PACKETHDR;
     }
 
-    if (flags == 0 && !_warn_no_flags) {
+    if (flags == 0 && !warn_no_flags) {
         SCLogWarning(SC_WARN_ANOMALY_CONFIG, "Anomaly logging has been configured; however, no logging types "
                      "have been selected. Select one or more logging types.");
-        _warn_no_flags = true;
+        warn_no_flags = true;
     }
     json_output_ctx->flags |= flags;
 }