]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
spm: constify badchars; suggested by cppcheck
authorVictor Julien <vjulien@oisf.net>
Wed, 27 Apr 2022 19:27:07 +0000 (21:27 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 9 May 2022 14:07:01 +0000 (16:07 +0200)
src/util-spm-bs2bm.c
src/util-spm-bs2bm.h

index d6529df85d12b9c5d825f72b71664be90d31bbae..85d85dced616b63d1afa1a718a80749ff8b04b75 100644 (file)
@@ -90,7 +90,8 @@ void Bs2BmBadcharsNocase(const uint8_t *needle, uint16_t needle_len, uint8_t *ba
  *
  * \retval ptr to start of the match; NULL if no match
  */
-uint8_t * Bs2Bm(const uint8_t *haystack, uint32_t haystack_len, const uint8_t *needle, uint16_t needle_len, uint8_t badchars[])
+uint8_t *Bs2Bm(const uint8_t *haystack, uint32_t haystack_len, const uint8_t *needle,
+        uint16_t needle_len, const uint8_t badchars[])
 {
     const uint8_t *h, *n;
     const uint8_t *hmax = haystack + haystack_len;
@@ -139,7 +140,8 @@ uint8_t * Bs2Bm(const uint8_t *haystack, uint32_t haystack_len, const uint8_t *n
  *
  * \retval ptr to start of the match; NULL if no match
  */
-uint8_t *Bs2BmNocase(const uint8_t *haystack, uint32_t haystack_len, const uint8_t *needle, uint16_t needle_len, uint8_t badchars[])
+uint8_t *Bs2BmNocase(const uint8_t *haystack, uint32_t haystack_len, const uint8_t *needle,
+        uint16_t needle_len, const uint8_t badchars[])
 {
     const uint8_t *h, *n;
     const uint8_t *hmax = haystack + haystack_len;
index a71b1282b88637fd3d3e6710439daa60ee571c38..99cd7abfd78009341f7925864a1e4bda3cd5a0f2 100644 (file)
@@ -31,8 +31,8 @@
 
 void Bs2BmBadchars(const uint8_t *, uint16_t, uint8_t *);
 void Bs2BmBadcharsNocase(const uint8_t *, uint16_t, uint8_t *);
-uint8_t * Bs2Bm(const uint8_t *, uint32_t, const uint8_t *, uint16_t, uint8_t []);
-uint8_t *Bs2BmNocase(const uint8_t *, uint32_t, const uint8_t *, uint16_t, uint8_t []);
+uint8_t *Bs2Bm(const uint8_t *, uint32_t, const uint8_t *, uint16_t, const uint8_t[]);
+uint8_t *Bs2BmNocase(const uint8_t *, uint32_t, const uint8_t *, uint16_t, const uint8_t[]);
 
 #endif /* __UTIL_SPM_BS2BM__ */