]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
compile fixes
authorVictor Julien <victor@inliniac.net>
Wed, 8 Jan 2014 15:11:21 +0000 (16:11 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 10 Jan 2014 10:53:40 +0000 (11:53 +0100)
src/app-layer-parser.c
src/detect-engine-hcbd.c

index 0867e00df91bd2e5412f6077d17cb09d93cb6258..82f4fe2f8de2dd12fb5cb36822b27dc2140a12cb 100644 (file)
@@ -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)
index 373a4d9615c46ee9cd2224dba40938a4c97672f2..79d0fdf882c574e9428b362d0b84e17f221a7864 100644 (file)
@@ -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));