diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 0867e00df9..82f4fe2f8d 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -662,10 +662,9 @@ int AppLayerParserGetEventInfo(uint16_t ipproto, AppProto alproto, const char *e { SCEnter(); int ipproto_map = FlowGetProtoMapping(ipproto); - SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo == NULL) ? - -1 : - alp_ctx.ctxs[ipproto_map][alproto]. - StateGetEventInfo(event_name, event_id, event_type)); + int r = (alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo == NULL) ? + -1 : alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo(event_name, event_id, event_type); + SCReturnInt(r); } uint8_t AppLayerParserGetFirstDataDir(uint16_t ipproto, uint16_t alproto) @@ -860,16 +859,16 @@ int AppLayerParserProtocolIsTxEventAware(uint16_t ipproto, AppProto alproto) { SCEnter(); int ipproto_map = FlowGetProtoMapping(ipproto); - SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateHasEvents == NULL) ? - 0 : 1); + int r = (alp_ctx.ctxs[ipproto_map][alproto].StateHasEvents == NULL) ? 0 : 1; + SCReturnInt(r); } int AppLayerParserProtocolSupportsTxs(uint16_t ipproto, AppProto alproto) { SCEnter(); int ipproto_map = FlowGetProtoMapping(ipproto); - SCReturnInt((alp_ctx.ctxs[ipproto_map][alproto].StateTransactionFree == NULL) ? - 0 : 1); + int r = (alp_ctx.ctxs[ipproto_map][alproto].StateTransactionFree == NULL) ? 0 : 1; + SCReturnInt(r); } void AppLayerParserTriggerRawStreamReassembly(Flow *f) diff --git a/src/detect-engine-hcbd.c b/src/detect-engine-hcbd.c index 373a4d9615..79d0fdf882 100644 --- a/src/detect-engine-hcbd.c +++ b/src/detect-engine-hcbd.c @@ -3610,6 +3610,7 @@ static int DetectEngineHttpClientBodyTest29(void) DetectEngineCtx *de_ctx = NULL; DetectEngineThreadCtx *det_ctx = NULL; Flow f; + void *alp_tctx = NULL; const char *request_buffer = "GET /one HTTP/1.0\r\n" "Host: localhost\r\n" "\r\n"; @@ -3623,7 +3624,7 @@ static int DetectEngineHttpClientBodyTest29(void) strlen(request_buffer)); } uint32_t http_buf_len = TOTAL_REQUESTS * strlen(request_buffer); - void *alp_tctx = AppLayerParserGetCtxThread(); + alp_tctx = AppLayerParserGetCtxThread(); memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f));