From: Victor Julien Date: Fri, 19 Aug 2016 11:58:07 +0000 (+0200) Subject: detect: minor style fixes X-Git-Tag: suricata-3.1.2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec0217f52cb060b2b74725cd8fbb7aa03e84342f;p=thirdparty%2Fsuricata.git detect: minor style fixes --- 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++;