From ec0217f52cb060b2b74725cd8fbb7aa03e84342f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 19 Aug 2016 13:58:07 +0200 Subject: [PATCH] detect: minor style fixes --- src/detect-engine-mpm.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c index 4c0d7dc91c..be02ed57d7 100644 --- a/src/detect-engine-mpm.c +++ b/src/detect-engine-mpm.c @@ -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++; -- 2.47.2