Get rid of #ifdef, and split out embedded function calls in if statements.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- a/net/ipv4/fib_trie.c       2008-01-14 14:24:58.000000000 -0800
+++ b/net/ipv4/fib_trie.c       2008-01-14 14:26:05.000000000 -0800
@@ -1293,7 +1293,9 @@ static inline int check_leaf(struct trie
                if (l->key != (key & ntohl(mask)))
                        continue;
 
-               if ((err = fib_semantic_match(&li->falh, flp, res, 
htonl(l->key), mask, i)) <= 0) {
+               err = fib_semantic_match(&li->falh, flp, res,
+                                        htonl(l->key), mask, i);
+               if (err <= 0) {
                        *plen = i;
 #ifdef CONFIG_IP_FIB_TRIE_STATS
                        t->stats.semantic_match_passed++;
@@ -1335,7 +1337,8 @@ fn_trie_lookup(struct fib_table *tb, con
 
        /* Just a leaf? */
        if (IS_LEAF(n)) {
-               if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, 
res)) <= 0)
+               ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res);
+               if (ret <= 0)
                        goto found;
                goto failed;
        }
@@ -1360,14 +1363,13 @@ fn_trie_lookup(struct fib_table *tb, con
                }
 
                if (IS_LEAF(n)) {
-                       if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, 
flp, res)) <= 0)
+                       ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, 
res);
+                       if (ret <= 0)
                                goto found;
                        else
                                goto backtrace;
                }
 
-#define HL_OPTIMIZE
-#ifdef HL_OPTIMIZE
                cn = (struct tnode *)n;
 
                /*
@@ -1455,7 +1457,7 @@ fn_trie_lookup(struct fib_table *tb, con
                        if (current_prefix_length >= cn->pos)
                                current_prefix_length = mp;
                }
-#endif
+
                pn = (struct tnode *)n; /* Descend */
                chopped_off = 0;
                continue;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to