else if (node->parent->child[1] == node)
node->parent->child[1] = NULL;
else
- bug("Invalid child pointer");
+ bug("Corrupted memory (node is not its parent's child)");
}
node->parent = NULL;
}
}
- bug("No bucket to choose from");
+ bug("No potential buckets to choose from");
}
/*
struct net_addr addr = { 0 };
net_fill_ipa(&addr, *prefix, pxlen);
- buffer_print(buf, "%*s%s%N ", 2 * node->depth, "", IN_FIB == node->status ? "@" : " ", &addr);
+ buffer_print(buf, "%*s%s%N ", 2 * node->depth, "", (IN_FIB == node->status) ? "@" : " ", &addr);
if (node->original_bucket)
buffer_print(buf, "[%u] ", node->original_bucket->id);
else if (node == parent->child[1])
path[pos++] = 1;
else
- bug("Fatal error");
+ bug("Corrupted memory (node is not its parent's child)");
assert(pos < IP6_MAX_PREFIX_LENGTH);
node = parent;
* processing of incremental updates. If it's not original, then it is
* a filler because it's not going to FIB.
*/
- node->px_origin = ORIGINAL == node->px_origin ? ORIGINAL : FILLER;
+ node->px_origin = (ORIGINAL == node->px_origin) ? ORIGINAL : FILLER;
}
else
{
* Keep information whether this prefix was original. If not, then its origin
* is changed to aggregated, because it's going to FIB.
*/
- node->px_origin = ORIGINAL == node->px_origin ? ORIGINAL : AGGREGATED;
+ node->px_origin = (ORIGINAL == node->px_origin) ? ORIGINAL : AGGREGATED;
node->status = IN_FIB;
}