]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
radix: small cppcheck suggested cleanup
authorVictor Julien <vjulien@oisf.net>
Wed, 27 Apr 2022 19:26:19 +0000 (21:26 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 9 May 2022 14:06:53 +0000 (16:06 +0200)
src/util-radix-tree.c

index 9d2074bc653e9dd3661002a84d17c0767a0d1793..3277ac0ecc934e39d1c84691b91511f0aea376ca 100644 (file)
@@ -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;