From 71eec581a3890e8f1ab332488014eb4d8dc1b617 Mon Sep 17 00:00:00 2001 From: nnposter Date: Sun, 13 Jan 2019 23:33:49 +0000 Subject: [PATCH] Move declaration to the front to improve compiler compatibility --- nbase/nbase_addrset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nbase/nbase_addrset.c b/nbase/nbase_addrset.c index 27e318731b..3448e794ef 100644 --- a/nbase/nbase_addrset.c +++ b/nbase/nbase_addrset.c @@ -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 */ @@ -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 */