]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
general/bool: Use bool for file support
authorJeff Lucovsky <jlucovsky@oisf.net>
Thu, 27 Jul 2023 13:30:09 +0000 (09:30 -0400)
committerVictor Julien <victor@inliniac.net>
Fri, 17 Nov 2023 21:24:13 +0000 (22:24 +0100)
src/app-layer-parser.c
src/app-layer-parser.h

index 7783c076b65b9605eb996286de598e81cd2a771a..572e15f628cc1bcd34c3cc39d23b85f7638fbfc7 100644 (file)
@@ -1184,16 +1184,14 @@ uint64_t AppLayerParserGetTransactionActive(const Flow *f,
     SCReturnCT(active_id, "uint64_t");
 }
 
-int AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto)
+bool AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto)
 {
     // Custom case for only signature-only protocol so far
     if (alproto == ALPROTO_HTTP) {
         return AppLayerParserSupportsFiles(ipproto, ALPROTO_HTTP1) ||
                AppLayerParserSupportsFiles(ipproto, ALPROTO_HTTP2);
     }
-    if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].GetTxFiles != NULL)
-        return TRUE;
-    return FALSE;
+    return alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].GetTxFiles != NULL;
 }
 
 AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx)
index d27a08c85119130a626093c0779ce06d0f0dd68a..e9f8cf55e925587aadbc9cf72e2a48cadb5af9fb 100644 (file)
@@ -253,7 +253,7 @@ uint64_t AppLayerParserGetTransactionActive(const Flow *f, AppLayerParserState *
 
 uint8_t AppLayerParserGetFirstDataDir(uint8_t ipproto, AppProto alproto);
 
-int AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto);
+bool AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto);
 
 AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx);
 uint64_t AppLayerParserGetTxDetectFlags(AppLayerTxData *txd, const uint8_t dir);