From 9411039fce1ca7391eccc961a3f7e8f3ab162cbc Mon Sep 17 00:00:00 2001 From: karantin2020 Date: Sat, 26 Mar 2016 23:32:37 +0500 Subject: [PATCH] Router match logic corrected --- src/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node.c b/src/node.c index 1883019..8088a6d 100644 --- a/src/node.c +++ b/src/node.c @@ -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 ) {