#endif
#endif
+#ifndef MAX_COMP_EDGES
+#define MAX_COMP_EDGES (4)
+#endif
+#endif
+
#define MAX_KEY_BYTES (256)
#define MAX_KEY_BITS (MAX_KEY_BYTES * 8)
#endif
int used; //!< number of used entries
- uint8_t index[4];
- fr_trie_t *trie[4];
+ uint8_t index[MAX_COMP_EDGES];
+ fr_trie_t *trie[MAX_COMP_EDGES];
} fr_trie_comp_t;
#endif
if (chunk >= (1 << comp->bits)) return -1;
- if (comp->used >= 4) return -1;
+ if (comp->used >= MAX_COMP_EDGES) return -1;
edge = comp->used;
for (i = 0; i < comp->used; i++) {
break;
}
- if (edge == 4) return -1;
+ if (edge == MAX_COMP_EDGES) return -1;
/*
* Move the nodes up so that we have room for the
/*
* All edges are used. Create an N-way node.
*/
- if (comp->used == 4) {
+ if (comp->used == MAX_COMP_EDGES) {
int bits = comp->bits;
fr_trie_node_t *node;