quick "for" statement
This commit is contained in:
parent
e4eada3250
commit
2e7ec1357d
1 changed files with 2 additions and 4 deletions
|
@ -286,8 +286,7 @@ node * r3_tree_matchl(const node * n, const char * path, int path_len, match_ent
|
||||||
if (n->compare_type == NODE_COMPARE_OPCODE) {
|
if (n->compare_type == NODE_COMPARE_OPCODE) {
|
||||||
pp_end = path + path_len;
|
pp_end = path + path_len;
|
||||||
|
|
||||||
i = n->edge_len;
|
for (i = n->edge_len; i--; ) {
|
||||||
while(i--) {
|
|
||||||
pp = path;
|
pp = path;
|
||||||
e = n->edges[i];
|
e = n->edges[i];
|
||||||
switch(e->opcode) {
|
switch(e->opcode) {
|
||||||
|
@ -430,8 +429,7 @@ route * r3_tree_match_route(const node *tree, match_entry * entry) {
|
||||||
int i;
|
int i;
|
||||||
n = r3_tree_match_entry(tree, entry);
|
n = r3_tree_match_entry(tree, entry);
|
||||||
if (n && n->routes && n->route_len > 0) {
|
if (n && n->routes && n->route_len > 0) {
|
||||||
i = n->route_len;
|
for (i = n->route_len; i--; ) {
|
||||||
while(i--) {
|
|
||||||
if ( r3_route_cmp(n->routes[i], entry) == 0 ) {
|
if ( r3_route_cmp(n->routes[i], entry) == 0 ) {
|
||||||
return n->routes[i];
|
return n->routes[i];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue