Skip to content

Commit

Permalink
Move declaration to the front to improve compiler compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nnposter committed Jan 13, 2019
1 parent 9af581e commit 71eec58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nbase/nbase_addrset.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ static struct trie_node *new_trie_node(const u32 *addr, const u32 *mask)
* and one that does not. */
static void trie_split (struct trie_node *this, const u32 *addr)
{
struct trie_node *new_node;
u32 new_mask[4] = {0,0,0,0};
u8 i;
/* Calculate the mask of the common prefix */
Expand All @@ -375,7 +376,7 @@ static void trie_split (struct trie_node *this, const u32 *addr)
}
}
/* Make a copy of this node to continue matching what it has been */
struct trie_node *new_node = new_trie_node(this->addr, this->mask);
new_node = new_trie_node(this->addr, this->mask);
new_node->next_bit_one = this->next_bit_one;
new_node->next_bit_zero = this->next_bit_zero;
/* Adjust this node to the smaller mask */
Expand Down

0 comments on commit 71eec58

Please sign in to comment.