use while instead of for loop to simplify execution
This commit is contained in:
parent
c5ed7e202c
commit
190986fb31
1 changed files with 2 additions and 2 deletions
|
@ -411,9 +411,9 @@ route * r3_tree_match_route(const node *tree, match_entry * entry) {
|
|||
}
|
||||
|
||||
inline edge * r3_node_find_edge_str(const node * n, const char * str, int str_len) {
|
||||
unsigned short i = 0;
|
||||
char firstbyte = *str;
|
||||
for (; i < n->edge_len ; i++ ) {
|
||||
unsigned int i = n->edge_len;
|
||||
while (i--) {
|
||||
if ( firstbyte == *(n->edges[i]->pattern) ) {
|
||||
info("matching '%s' with '%s'\n", str, node_edge_pattern(n,i) );
|
||||
if ( strncmp( node_edge_pattern(n,i), str, node_edge_pattern_len(n,i) ) == 0 ) {
|
||||
|
|
Loading…
Reference in a new issue