Problem: redundant check in condition

Solution: remove it
This commit is contained in:
Shubham Lagwankar 2019-07-26 11:43:57 -04:00
parent 49f4ef1759
commit f07d88be09

View File

@ -292,8 +292,7 @@ bool zmq::radix_tree_t::add (const unsigned char *key_, size_t key_size_)
if (key_bytes_matched != key_size_) {
// Not all characters match, we might have to split the node.
if (key_bytes_matched == 0
|| prefix_bytes_matched == current_node.prefix_length ()) {
if (prefix_bytes_matched == current_node.prefix_length ()) {
// The mismatch is at one of the outgoing edges, so we
// create an edge from the current node to a new leaf node
// that has the rest of the key as the prefix.