From: Jeff Lucovsky Date: Thu, 27 Jul 2023 13:30:09 +0000 (-0400) Subject: general/bool: Use bool for file support X-Git-Tag: suricata-8.0.0-beta1~2067 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=051a14acd30b31eccc3ca96a58240cd7be89142d;p=thirdparty%2Fsuricata.git general/bool: Use bool for file support --- diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 7783c076b6..572e15f628 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -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) diff --git a/src/app-layer-parser.h b/src/app-layer-parser.h index d27a08c851..e9f8cf55e9 100644 --- a/src/app-layer-parser.h +++ b/src/app-layer-parser.h @@ -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);