MemBuffer *payload = aft->payload_buffer;
AlertJsonOutputCtx *json_output_ctx = aft->json_output_ctx;
- int i;
-
if (p->alerts.cnt == 0 && !(p->flags & PKT_HAS_TAG))
return TM_ECODE_OK;
- for (i = 0; i < p->alerts.cnt; i++) {
+ for (int i = 0; i < p->alerts.cnt; i++) {
const PacketAlert *pa = &p->alerts.alerts[i];
if (unlikely(pa->s == NULL)) {
continue;
if (json_output_ctx->flags & LOG_JSON_RULE_METADATA) {
AlertAddFiles(p, jb, pa->tx_id);
}
- }
- if (p->flow) {
EveAddAppProto(p->flow, jb);
if (json_output_ctx->flags & LOG_JSON_FLOW) {
jb_open_object(jb, "flow");