]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: minor style fixes
authorVictor Julien <victor@inliniac.net>
Fri, 19 Aug 2016 11:58:07 +0000 (13:58 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 29 Aug 2016 09:46:58 +0000 (11:46 +0200)
src/detect-engine-mpm.c

index 4c0d7dc91c56c91862f3c21e45e7616cfb005350..be02ed57d7a202762121fffe6aac813474840077 100644 (file)
@@ -1364,6 +1364,7 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx)
     PatIntId max_id = 0;
     DetectFPAndItsId *struct_offset = (DetectFPAndItsId *)ahb;
     uint8_t *content_offset = ahb + struct_total_size;
+
     for (s = de_ctx->sig_list; s != NULL; s = s->next) {
         if (s->mpm_sm != NULL) {
             int sm_list = SigMatchListSMBelongsTo(s, s->mpm_sm);
@@ -1401,8 +1402,8 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx)
                 break;
             }
             if (dup != struct_offset) {
-              /* Exited for-loop before the end, so found an existing match.
-               * Use its ID. */
+                /* Exited for-loop before the end, so found an existing match.
+                 * Use its ID. */
                 cd->id = dup->id;
                 continue;
             }
@@ -1421,14 +1422,14 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx)
             content_offset += content_len;
 
             if (flags & DETECT_CONTENT_NOCASE) {
-              /* Need to store case-insensitive patterns as lower case
-               * because SCMemcmpLowercase() above assumes that all
-               * patterns are stored lower case so that it doesn't
-               * need to relower its first argument.
-               */
-              memcpy_tolower(struct_offset->content, content, content_len);
+                /* Need to store case-insensitive patterns as lower case
+                 * because SCMemcmpLowercase() above assumes that all
+                 * patterns are stored lower case so that it doesn't
+                 * need to relower its first argument.
+                 */
+                memcpy_tolower(struct_offset->content, content, content_len);
             } else {
-              memcpy(struct_offset->content, content, content_len);
+                memcpy(struct_offset->content, content, content_len);
             }
 
             struct_offset++;