SCEnter();
DetectPcreData *pd = NULL;
SigMatch *sm = NULL;
- int ret = -1;
int parsed_sm_list = DETECT_SM_LIST_NOTSET;
char capture_names[1024] = "";
AppProto alproto = ALPROTO_UNKNOWN;
goto error;
#ifdef PCRE_HAVE_JIT_EXEC
- /*
- * Deliberately silent on failures. Not having a context id means
- * JIT will be bypassed
- */
+ /* Deliberately silent on failures. Not having a context id means
+ * JIT will be bypassed */
pd->thread_ctx_jit_stack_id = DetectRegisterThreadCtxFuncs(de_ctx, "pcre",
DetectPcreThreadInit, (void *)pd,
DetectPcreThreadFree, 1);
s->flags |= SIG_FLAG_APPLAYER;
sm_list = s->init_data->list;
} else {
- switch(parsed_sm_list) {
+ switch (parsed_sm_list) {
case DETECT_SM_LIST_NOTSET:
sm_list = DETECT_SM_LIST_PMATCH;
break;
sm->ctx = (void *)pd;
SigMatchAppendSMToList(s, sm, sm_list);
- uint8_t x;
- for (x = 0; x < pd->idx; x++) {
+ for (uint8_t x = 0; x < pd->idx; x++) {
if (DetectFlowvarPostMatchSetup(de_ctx, s, pd->capids[x]) < 0)
goto error_nofree;
}
"preceding match in the same buffer");
goto error_nofree;
/* null is allowed when we use a sticky buffer */
- } else if (prev_pm == NULL)
+ } else if (prev_pm == NULL) {
goto okay;
+ }
if (prev_pm->type == DETECT_CONTENT) {
DetectContentData *cd = (DetectContentData *)prev_pm->ctx;
cd->flags |= DETECT_CONTENT_RELATIVE_NEXT;
}
okay:
- ret = 0;
- SCReturnInt(ret);
+ SCReturnInt(0);
error:
DetectPcreFree(de_ctx, pd);
error_nofree:
- SCReturnInt(ret);
+ SCReturnInt(-1);
}
static void DetectPcreFree(DetectEngineCtx *de_ctx, void *ptr)