From: Victor Julien Date: Mon, 19 Oct 2020 13:33:36 +0000 (+0200) Subject: detect: remove unused arg from generic list inspect X-Git-Tag: suricata-7.0.0-beta1~1958 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84385549fe99ada08310459c236484ec316eb8a5;p=thirdparty%2Fsuricata.git detect: remove unused arg from generic list inspect --- diff --git a/src/detect-dce-iface.c b/src/detect-dce-iface.c index 2383efba8d..3b134ec7bf 100644 --- a/src/detect-dce-iface.c +++ b/src/detect-dce-iface.c @@ -100,7 +100,7 @@ static int InspectDceGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-dnp3.c b/src/detect-dnp3.c index 6ffa42f25a..d0f78e7ac7 100644 --- a/src/detect-dnp3.c +++ b/src/detect-dnp3.c @@ -181,7 +181,7 @@ static int DetectEngineInspectDNP3(DetectEngineCtx *de_ctx, DetectEngineThreadCt uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-dns-opcode.c b/src/detect-dns-opcode.c index bbb58d2cca..e4356c47bf 100644 --- a/src/detect-dns-opcode.c +++ b/src/detect-dns-opcode.c @@ -79,7 +79,7 @@ static int DetectEngineInspectRequestGenericDnsOpcode(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } void DetectDnsOpcodeRegister(void) diff --git a/src/detect-engine-dns.c b/src/detect-engine-dns.c index 77721b3d41..c3d6873b3f 100644 --- a/src/detect-engine-dns.c +++ b/src/detect-engine-dns.c @@ -52,7 +52,7 @@ int DetectEngineInspectDnsRequest(DetectEngineCtx *de_ctx, DetectEngineThreadCtx uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } int DetectEngineInspectDnsResponse(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, @@ -60,5 +60,5 @@ int DetectEngineInspectDnsResponse(DetectEngineCtx *de_ctx, DetectEngineThreadCt uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } diff --git a/src/detect-engine.c b/src/detect-engine.c index 7e6633483d..cbb681963b 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -1529,12 +1529,9 @@ int DetectEngineReloadIsIdle(void) * \retval 0 no match * \retval 1 match */ -int DetectEngineInspectGenericList(ThreadVars *tv, - const DetectEngineCtx *de_ctx, - DetectEngineThreadCtx *det_ctx, - const Signature *s, const SigMatchData *smd, - Flow *f, const uint8_t flags, - void *alstate, void *txv, uint64_t tx_id) +int DetectEngineInspectGenericList(const DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, + const Signature *s, const SigMatchData *smd, Flow *f, const uint8_t flags, void *alstate, + void *txv, uint64_t tx_id) { SCLogDebug("running match functions, sm %p", smd); if (smd != NULL) { diff --git a/src/detect-engine.h b/src/detect-engine.h index 7d61ff91e7..dc72b2f670 100644 --- a/src/detect-engine.h +++ b/src/detect-engine.h @@ -114,11 +114,8 @@ int DetectEngineTentantUnregisterVlanId(uint32_t tenant_id, uint16_t vlan_id); int DetectEngineTentantRegisterPcapFile(uint32_t tenant_id); int DetectEngineTentantUnregisterPcapFile(uint32_t tenant_id); -int DetectEngineInspectGenericList(ThreadVars *, const DetectEngineCtx *, - DetectEngineThreadCtx *, - const Signature *, const SigMatchData *, - Flow *, const uint8_t, void *, void *, - uint64_t); +int DetectEngineInspectGenericList(const DetectEngineCtx *, DetectEngineThreadCtx *, + const Signature *, const SigMatchData *, Flow *, const uint8_t, void *, void *, uint64_t); int DetectEngineInspectBufferGeneric( DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, diff --git a/src/detect-ftpbounce.c b/src/detect-ftpbounce.c index 5e55676b27..244b6387dd 100644 --- a/src/detect-ftpbounce.c +++ b/src/detect-ftpbounce.c @@ -88,7 +88,7 @@ static int InspectFtpRequest(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-ftpdata.c b/src/detect-ftpdata.c index 0c08e2f383..1d38e17a55 100644 --- a/src/detect-ftpdata.c +++ b/src/detect-ftpdata.c @@ -92,7 +92,7 @@ static int DetectEngineInspectFtpdataGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-http2.c b/src/detect-http2.c index 3a986d99cb..af51cd1eb0 100644 --- a/src/detect-http2.c +++ b/src/detect-http2.c @@ -116,7 +116,7 @@ static int DetectEngineInspectHTTP2(DetectEngineCtx *de_ctx, DetectEngineThreadC uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-krb5-errcode.c b/src/detect-krb5-errcode.c index 44012f4b1c..c6c6e32d98 100644 --- a/src/detect-krb5-errcode.c +++ b/src/detect-krb5-errcode.c @@ -91,7 +91,7 @@ static int DetectEngineInspectKRB5Generic(DetectEngineCtx *de_ctx, DetectEngineT uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-krb5-msgtype.c b/src/detect-krb5-msgtype.c index fe0a6355c2..5c291d7464 100644 --- a/src/detect-krb5-msgtype.c +++ b/src/detect-krb5-msgtype.c @@ -91,7 +91,7 @@ static int DetectEngineInspectKRB5Generic(DetectEngineCtx *de_ctx, DetectEngineT void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-lua.c b/src/detect-lua.c index 1ff14226dc..3ce903a8f6 100644 --- a/src/detect-lua.c +++ b/src/detect-lua.c @@ -139,7 +139,7 @@ static int InspectSmtpGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *de uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } #define DATATYPE_PACKET (1<<0) diff --git a/src/detect-mqtt-connack-sessionpresent.c b/src/detect-mqtt-connack-sessionpresent.c index 4e195e150b..cb3321b2e9 100644 --- a/src/detect-mqtt-connack-sessionpresent.c +++ b/src/detect-mqtt-connack-sessionpresent.c @@ -77,7 +77,7 @@ static int DetectEngineInspectMQTTConnackSessionPresentGeneric(DetectEngineCtx * const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-mqtt-connect-flags.c b/src/detect-mqtt-connect-flags.c index 8447d31a2b..6054bd4acf 100644 --- a/src/detect-mqtt-connect-flags.c +++ b/src/detect-mqtt-connect-flags.c @@ -85,7 +85,7 @@ static int DetectEngineInspectMQTTConnectFlagsGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-mqtt-flags.c b/src/detect-mqtt-flags.c index 59c8fd7303..a2cde067b4 100644 --- a/src/detect-mqtt-flags.c +++ b/src/detect-mqtt-flags.c @@ -81,7 +81,7 @@ static int DetectEngineInspectMQTTFlagsGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-mqtt-protocol-version.c b/src/detect-mqtt-protocol-version.c index bc0f9e05ac..3ad43b43a9 100644 --- a/src/detect-mqtt-protocol-version.c +++ b/src/detect-mqtt-protocol-version.c @@ -74,7 +74,7 @@ static int DetectEngineInspectMQTTProtocolVersionGeneric(DetectEngineCtx *de_ctx const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-mqtt-qos.c b/src/detect-mqtt-qos.c index 588f5d504a..7166dd13d0 100644 --- a/src/detect-mqtt-qos.c +++ b/src/detect-mqtt-qos.c @@ -73,7 +73,7 @@ static int DetectEngineInspectMQTTQosGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-mqtt-reason-code.c b/src/detect-mqtt-reason-code.c index 8a1adba954..1fa1b7e934 100644 --- a/src/detect-mqtt-reason-code.c +++ b/src/detect-mqtt-reason-code.c @@ -79,7 +79,7 @@ static int DetectEngineInspectMQTTReasonCodeGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-mqtt-type.c b/src/detect-mqtt-type.c index c75c84d833..493be73f8a 100644 --- a/src/detect-mqtt-type.c +++ b/src/detect-mqtt-type.c @@ -72,7 +72,7 @@ static int DetectEngineInspectMQTTTypeGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-nfs-procedure.c b/src/detect-nfs-procedure.c index fc51af7208..b944d0507e 100644 --- a/src/detect-nfs-procedure.c +++ b/src/detect-nfs-procedure.c @@ -115,7 +115,7 @@ static int DetectEngineInspectNfsRequestGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } static inline int diff --git a/src/detect-nfs-version.c b/src/detect-nfs-version.c index f65753b2ae..74ac4cd662 100644 --- a/src/detect-nfs-version.c +++ b/src/detect-nfs-version.c @@ -114,7 +114,7 @@ static int DetectEngineInspectNfsRequestGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } static inline int diff --git a/src/detect-rfb-secresult.c b/src/detect-rfb-secresult.c index 92435a01d4..6f9915ca65 100644 --- a/src/detect-rfb-secresult.c +++ b/src/detect-rfb-secresult.c @@ -82,7 +82,7 @@ static int DetectEngineInspectRfbSecresultGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } enum { diff --git a/src/detect-rfb-sectype.c b/src/detect-rfb-sectype.c index 39e840e8e1..3f254c6da6 100644 --- a/src/detect-rfb-sectype.c +++ b/src/detect-rfb-sectype.c @@ -89,7 +89,7 @@ static int DetectEngineInspectRfbSectypeGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } static inline int SectypeMatch(const uint32_t version, diff --git a/src/detect-snmp-pdu_type.c b/src/detect-snmp-pdu_type.c index ad198c1d37..2762079831 100644 --- a/src/detect-snmp-pdu_type.c +++ b/src/detect-snmp-pdu_type.c @@ -86,7 +86,7 @@ static int DetectEngineInspectSNMPRequestGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-snmp-version.c b/src/detect-snmp-version.c index 76b166d78c..8013202d15 100644 --- a/src/detect-snmp-version.c +++ b/src/detect-snmp-version.c @@ -98,7 +98,7 @@ static int DetectEngineInspectSNMPRequestGeneric(DetectEngineCtx *de_ctx, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } static inline int diff --git a/src/detect-ssh-software-version.c b/src/detect-ssh-software-version.c index 4a603f24aa..0db75aa653 100644 --- a/src/detect-ssh-software-version.c +++ b/src/detect-ssh-software-version.c @@ -81,7 +81,7 @@ static int InspectSshBanner(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-ssl-state.c b/src/detect-ssl-state.c index 2af5db1a4b..958a7116fa 100644 --- a/src/detect-ssl-state.c +++ b/src/detect-ssl-state.c @@ -105,7 +105,7 @@ static int InspectTlsGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** diff --git a/src/detect-tls-cert-validity.c b/src/detect-tls-cert-validity.c index 8d4fb44660..aca8a69797 100644 --- a/src/detect-tls-cert-validity.c +++ b/src/detect-tls-cert-validity.c @@ -139,8 +139,9 @@ static int DetectEngineInspectTlsValidity(DetectEngineCtx *de_ctx, DetectEngineT uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } + /** * \internal * \brief Function to match validity field in a tls certificate. diff --git a/src/detect-tls.c b/src/detect-tls.c index 4585d9f4fa..626bd2de9e 100644 --- a/src/detect-tls.c +++ b/src/detect-tls.c @@ -100,7 +100,7 @@ static int InspectTlsCert(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ct uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { return DetectEngineInspectGenericList( - NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); + de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /**