Router match logic corrected

This commit is contained in:
karantin2020 2016-03-26 23:32:37 +05:00
parent ffc9e8571b
commit 9411039fce

View file

@ -438,8 +438,8 @@ R3Route * r3_tree_match_route(const R3Node *tree, match_entry * entry) {
R3Node *n;
R3Route *r;
n = r3_tree_match_entry(tree, entry);
unsigned int i, irs = n->routes.size;
if (n && irs) {
unsigned int i, irs;
if (n && (irs = n->routes.size)) {
r = n->routes.entries;
for (i = 0; irs - i; i++) {
if ( r3_route_cmp(r, entry) == 0 ) {