File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -132,17 +132,13 @@ struct addrset {
132
132
133
133
/* Special node pointer to represent "all possible addresses"
134
134
* This will be used to represent netmask specifications. */
135
- static struct trie_node * TRIE_NODE_TRUE = NULL ;
135
+ static struct trie_node g_TRIE_NODE_TRUE = {0 };
136
+ #define TRIE_NODE_TRUE &g_TRIE_NODE_TRUE
136
137
137
138
struct addrset * addrset_new ()
138
139
{
139
140
struct addrset * set = (struct addrset * ) safe_zalloc (sizeof (struct addrset ));
140
141
set -> head = NULL ;
141
- /* We could simply allocate one byte to get a unique address, but this
142
- * feels safer and is not too large. */
143
- if (TRIE_NODE_TRUE == NULL ) {
144
- TRIE_NODE_TRUE = (struct trie_node * ) safe_zalloc (sizeof (struct trie_node ));
145
- }
146
142
147
143
/* Allocate the first node of the IPv4 trie */
148
144
set -> trie = (struct trie_node * ) safe_zalloc (sizeof (struct trie_node ));
You can’t perform that action at this time.
0 commit comments