diff --git a/trie/trie.c b/trie/trie.c index 8e43d86..3da1ef6 100644 --- a/trie/trie.c +++ b/trie/trie.c @@ -2,7 +2,7 @@ #define INPUT_FILE "../data/routing-data" #define READ_MODE "r" -#define GET_BIT(key, bit) (( key.i[ bit / (sizeof(unsigned) * 8) ] & (1 << ((sizeof(unsigned) * 8 - 1) - (bit % (sizeof(unsigned) * 8)))) ) != 0 ) +#define GET_BIT(key, bit) ( ( key.l[ bit / 64 ] & (1ul << (63 - bit % 64)) ) != 0 ) trie_node_t create_node() {