From: Victor Julien Date: Wed, 27 Apr 2022 19:26:19 +0000 (+0200) Subject: radix: small cppcheck suggested cleanup X-Git-Tag: suricata-7.0.0-beta1~603 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99f212bc8c2d6b00b3315969337d36b1e3f43193;p=thirdparty%2Fsuricata.git radix: small cppcheck suggested cleanup --- diff --git a/src/util-radix-tree.c b/src/util-radix-tree.c index 9d2074bc65..3277ac0ecc 100644 --- a/src/util-radix-tree.c +++ b/src/util-radix-tree.c @@ -506,7 +506,6 @@ static SCRadixNode *SCRadixAddKey( uint16_t i = 0; uint16_t j = 0; - int temp = 0; if (tree == NULL) { SCLogError(SC_ERR_INVALID_ARGUMENT, "Argument \"tree\" NULL"); @@ -594,6 +593,7 @@ static SCRadixNode *SCRadixAddKey( /* get the first bit position where the ips differ */ check_bit = (node->bit < bitlen)? node->bit: bitlen; for (i = 0; (i * 8) < check_bit; i++) { + int temp; if ((temp = (stream[i] ^ bottom_node->prefix->stream[i])) == 0) { differ_bit = (i + 1) * 8; continue;