]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
src: apply clang formatting changes
authorShivani Bhardwaj <shivani@oisf.net>
Fri, 9 May 2025 05:32:30 +0000 (11:02 +0530)
committerVictor Julien <victor@inliniac.net>
Sat, 10 May 2025 01:09:49 +0000 (03:09 +0200)
src/decode.h
src/detect-engine-build.c
src/detect-engine-mpm.c
src/detect-engine-siggroup.c
src/detect.c

index 038739550432a33869654184db9a65d48745c862..a283eaa2e6c62c88588a0fd403be202c7b768be0 100644 (file)
@@ -241,7 +241,7 @@ typedef uint16_t Port;
 /* structure to store the sids/gids/etc the detection engine
  * found in this packet */
 typedef struct PacketAlert_ {
-    SigIntId iid; /* Internal ID, used for sorting */
+    SigIntId iid;   /* Internal ID, used for sorting */
     uint8_t action; /* Internal num, used for thresholding */
     uint8_t flags;
     const struct Signature_ *s;
index 342167786e93a8e390ec748dfe1942750be53ab0..3915aff01f842a9c25b9a19319857a7e1d26cb89 100644 (file)
@@ -1750,7 +1750,8 @@ int SigPrepareStage1(DetectEngineCtx *de_ctx)
     for (Signature *s = de_ctx->sig_list; s != NULL; s = s->next) {
         de_ctx->sig_array[s->iid] = s;
 
-        SCLogDebug("Signature %" PRIu32 ", internal id %" PRIu32 ", ptrs %p %p ", s->id, s->iid, s, de_ctx->sig_array[s->iid]);
+        SCLogDebug("Signature %" PRIu32 ", internal id %" PRIu32 ", ptrs %p %p ", s->id, s->iid, s,
+                de_ctx->sig_array[s->iid]);
 
         if (s->type == SIG_TYPE_PDONLY) {
             SCLogDebug("Signature %"PRIu32" is considered \"PD only\"", s->id);
index 9da22f41bf3ce7d7ccc2de10563349edf2b36b59..3ac3896a91653f979b515db2eae23fd6226ef111 100644 (file)
@@ -976,27 +976,19 @@ static void PopulateMpmHelperAddPattern(MpmCtx *mpm_ctx, const DetectContentData
 
     if (cd->flags & DETECT_CONTENT_NOCASE) {
         if (chop) {
-            MpmAddPatternCI(mpm_ctx,
-                            cd->content + cd->fp_chop_offset, cd->fp_chop_len,
-                            pat_offset, pat_depth,
-                            cd->id, s->iid, flags|MPM_PATTERN_CTX_OWNS_ID);
+            MpmAddPatternCI(mpm_ctx, cd->content + cd->fp_chop_offset, cd->fp_chop_len, pat_offset,
+                    pat_depth, cd->id, s->iid, flags | MPM_PATTERN_CTX_OWNS_ID);
         } else {
-            MpmAddPatternCI(mpm_ctx,
-                            cd->content, cd->content_len,
-                            pat_offset, pat_depth,
-                            cd->id, s->iid, flags|MPM_PATTERN_CTX_OWNS_ID);
+            MpmAddPatternCI(mpm_ctx, cd->content, cd->content_len, pat_offset, pat_depth, cd->id,
+                    s->iid, flags | MPM_PATTERN_CTX_OWNS_ID);
         }
     } else {
         if (chop) {
-            MpmAddPatternCS(mpm_ctx,
-                            cd->content + cd->fp_chop_offset, cd->fp_chop_len,
-                            pat_offset, pat_depth,
-                            cd->id, s->iid, flags|MPM_PATTERN_CTX_OWNS_ID);
+            MpmAddPatternCS(mpm_ctx, cd->content + cd->fp_chop_offset, cd->fp_chop_len, pat_offset,
+                    pat_depth, cd->id, s->iid, flags | MPM_PATTERN_CTX_OWNS_ID);
         } else {
-            MpmAddPatternCS(mpm_ctx,
-                            cd->content, cd->content_len,
-                            pat_offset, pat_depth,
-                            cd->id, s->iid, flags|MPM_PATTERN_CTX_OWNS_ID);
+            MpmAddPatternCS(mpm_ctx, cd->content, cd->content_len, pat_offset, pat_depth, cd->id,
+                    s->iid, flags | MPM_PATTERN_CTX_OWNS_ID);
         }
     }
 }
index 2fbf257f464a28c45c0cd32586bc343a3cccb83c..2163010e58c4f7befd8b773160aee1c23f5e49b1 100644 (file)
@@ -514,7 +514,7 @@ void SigGroupHeadPrintSigs(DetectEngineCtx *de_ctx, SigGroupHead *sgh)
     for (u = 0; u < (sgh->init->sig_size * 8); u++) {
         if (sgh->init->sig_array[u / 8] & (1 << (u % 8))) {
             SCLogDebug("%" PRIu32, u);
-            printf("s->iid %"PRIu32" ", u);
+            printf("s->iid %" PRIu32 " ", u);
         }
     }
 
index 02d649c624be2cf8d90237a1bcad09f95e954437..8f39e8ff3054d21e854992775184cf6bfe15bc92 100644 (file)
@@ -1863,8 +1863,8 @@ static void DetectRunTx(ThreadVars *tv,
                 /* threat detect rules will be inspected */
             }
 
-            SCLogDebug("%p/%"PRIu64" inspecting: sid %u (%u), flags %08x",
-                    tx.tx_ptr, tx.tx_id, s->id, s->iid, inspect_flags ? *inspect_flags : 0);
+            SCLogDebug("%p/%" PRIu64 " inspecting: sid %u (%u), flags %08x", tx.tx_ptr, tx.tx_id,
+                    s->id, s->iid, inspect_flags ? *inspect_flags : 0);
 
             if (inspect_flags) {
                 if (*inspect_flags & DE_STATE_FLAG_FULL_INSPECT) {
@@ -1933,7 +1933,8 @@ static void DetectRunTx(ThreadVars *tv,
                     alert_flags |= PACKET_ALERT_FLAG_APPLY_ACTION_TO_PACKET;
                 }
 
-                SCLogDebug("%p/%"PRIu64" sig %u (%u) matched", tx.tx_ptr, tx.tx_id, s->id, s->iid);
+                SCLogDebug(
+                        "%p/%" PRIu64 " sig %u (%u) matched", tx.tx_ptr, tx.tx_id, s->id, s->iid);
                 AlertQueueAppend(det_ctx, s, p, tx.tx_id, alert_flags);
 
                 if ((s->flags & SIG_FLAG_FIREWALL) && (s->action & ACTION_ACCEPT)) {