]> git.ipfire.org Git - thirdparty/suricata.git/commit
datasets: work around scan-build warning
authorVictor Julien <vjulien@oisf.net>
Tue, 18 Mar 2025 21:26:53 +0000 (22:26 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 19 Mar 2025 15:58:51 +0000 (16:58 +0100)
commitc6fdf99cec1ba7067b20e68ea4e812cb4c043881
tree157f0b478c46c30e27f570d1d9f519794b8a9385
parentbe372ce39ddca13dc62224b52e2a48bd9b45c74d
datasets: work around scan-build warning

datasets.c:493:27: warning: Dereference of null pointer [core.NullDereference]
  493 |     DEBUG_VALIDATE_BUG_ON(set->hash->config.hash_size != hashsize);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./util-validate.h:95:44: note: expanded from macro 'DEBUG_VALIDATE_BUG_ON'
   95 | #define DEBUG_VALIDATE_BUG_ON(exp) BUG_ON((exp))
      |                                            ^~~
./suricata-common.h:307:36: note: expanded from macro 'BUG_ON'
  307 |         #define BUG_ON(x) assert(!(x))
      |                                    ^
/usr/include/assert.h:109:7: note: expanded from macro 'assert'
  109 |     ((expr)                                                             \
      |       ^~~~
1 warning generated.
src/datasets.c