From: Victor Julien Date: Wed, 27 Apr 2022 19:19:43 +0000 (+0200) Subject: defrag: minor code cleanups suggested by cppcheck X-Git-Tag: suricata-7.0.0-beta1~606 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f54024d3bba6d4822358de4e2112ee34e3fa17;p=thirdparty%2Fsuricata.git defrag: minor code cleanups suggested by cppcheck --- diff --git a/src/defrag-hash.c b/src/defrag-hash.c index 55515cbe3f..24afa76cf4 100644 --- a/src/defrag-hash.c +++ b/src/defrag-hash.c @@ -341,11 +341,9 @@ void DefragHashShutdown(void) * detect-engine-address-ipv6.c's AddressIPv6GtU32 is likely * what you are looking for. */ -static inline int DefragHashRawAddressIPv6GtU32(uint32_t *a, uint32_t *b) +static inline int DefragHashRawAddressIPv6GtU32(const uint32_t *a, const uint32_t *b) { - int i; - - for (i = 0; i < 4; i++) { + for (int i = 0; i < 4; i++) { if (a[i] > b[i]) return 1; if (a[i] < b[i])