From: Victor Julien Date: Wed, 27 Apr 2022 18:19:09 +0000 (+0200) Subject: ftp: code clarifications X-Git-Tag: suricata-7.0.0-beta1~611 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c3222dee6506c8e9d8a79a75b90a4827e995cd8;p=thirdparty%2Fsuricata.git ftp: code clarifications src/app-layer-ftp.c:945:49: style: Parameter 'ftp_state' can be declared with const [constParameter] static FTPTransaction *FTPGetOldestTx(FtpState *ftp_state, FTPTransaction *starttx) ^ --- diff --git a/src/app-layer-ftp.c b/src/app-layer-ftp.c index 3f96da9722..7bae47df74 100644 --- a/src/app-layer-ftp.c +++ b/src/app-layer-ftp.c @@ -132,7 +132,7 @@ uint32_t ftp_max_line_len = 4096; SC_ATOMIC_DECLARE(uint64_t, ftp_memuse); SC_ATOMIC_DECLARE(uint64_t, ftp_memcap); -static FTPTransaction *FTPGetOldestTx(FtpState *, FTPTransaction *); +static FTPTransaction *FTPGetOldestTx(const FtpState *, FTPTransaction *); static void FTPParseMemcap(void) { @@ -952,7 +952,7 @@ static void FTPStateFree(void *s) * * \retval transaction pointer when a transaction was found; NULL otherwise. */ -static FTPTransaction *FTPGetOldestTx(FtpState *ftp_state, FTPTransaction *starttx) +static FTPTransaction *FTPGetOldestTx(const FtpState *ftp_state, FTPTransaction *starttx) { if (unlikely(!ftp_state)) { SCLogDebug("NULL state object; no transactions available");