[IPV4]: no need pass pointer to a default into fib_detect_death
authorDenis V. Lunev <den@openvz.org>
Sat, 8 Dec 2007 08:22:13 +0000 (00:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:57:00 +0000 (14:57 -0800)
ipv4: no need pass pointer to a default into fib_detect_death

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_hash.c
net/ipv4/fib_lookup.h
net/ipv4/fib_semantics.c
net/ipv4/fib_trie.c

index 638185eb315f8defe6e980448f35ac85cd235aed..143a5213a185cb6c6fb6ca8b7e4d5830006b6cdb 100644 (file)
@@ -314,7 +314,7 @@ fn_hash_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
                                if (next_fi != res->fi)
                                        break;
                        } else if (!fib_detect_death(fi, order, &last_resort,
-                                                    &last_idx, &fn_hash_last_dflt)) {
+                                                    &last_idx, fn_hash_last_dflt)) {
                                if (res->fi)
                                        fib_info_put(res->fi);
                                res->fi = fi;
@@ -332,7 +332,7 @@ fn_hash_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
                goto out;
        }
 
-       if (!fib_detect_death(fi, order, &last_resort, &last_idx, &fn_hash_last_dflt)) {
+       if (!fib_detect_death(fi, order, &last_resort, &last_idx, fn_hash_last_dflt)) {
                if (res->fi)
                        fib_info_put(res->fi);
                res->fi = fi;
index eef9eec17e0c584a383df0a8064117b3feb238f8..6c9dd4282db03ad576012cb316b0fb701587f3d8 100644 (file)
@@ -36,6 +36,6 @@ extern struct fib_alias *fib_find_alias(struct list_head *fah,
                                        u8 tos, u32 prio);
 extern int fib_detect_death(struct fib_info *fi, int order,
                            struct fib_info **last_resort,
-                           int *last_idx, int *dflt);
+                           int *last_idx, int dflt);
 
 #endif /* _FIB_LOOKUP_H */
index ec9b0dde9f9c6cc8aa6def4f34072a4c2f7366a1..bbd4a247b19508c23c10c5a854dda30470560622 100644 (file)
@@ -346,7 +346,7 @@ struct fib_alias *fib_find_alias(struct list_head *fah, u8 tos, u32 prio)
 }
 
 int fib_detect_death(struct fib_info *fi, int order,
-                    struct fib_info **last_resort, int *last_idx, int *dflt)
+                    struct fib_info **last_resort, int *last_idx, int dflt)
 {
        struct neighbour *n;
        int state = NUD_NONE;
@@ -358,10 +358,10 @@ int fib_detect_death(struct fib_info *fi, int order,
        }
        if (state==NUD_REACHABLE)
                return 0;
-       if ((state&NUD_VALID) && order != *dflt)
+       if ((state&NUD_VALID) && order != dflt)
                return 0;
        if ((state&NUD_VALID) ||
-           (*last_idx<0 && order > *dflt)) {
+           (*last_idx<0 && order > dflt)) {
                *last_resort = fi;
                *last_idx = order;
        }
index 13a80aa911d81b273c081ffe328d1dfbf533721d..d48a9bbcf54d800abda77847b7820e3d2202b531 100644 (file)
@@ -1830,7 +1830,7 @@ fn_trie_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
                        if (next_fi != res->fi)
                                break;
                } else if (!fib_detect_death(fi, order, &last_resort,
-                                            &last_idx, &trie_last_dflt)) {
+                                            &last_idx, trie_last_dflt)) {
                        if (res->fi)
                                fib_info_put(res->fi);
                        res->fi = fi;
@@ -1846,7 +1846,7 @@ fn_trie_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
                goto out;
        }
 
-       if (!fib_detect_death(fi, order, &last_resort, &last_idx, &trie_last_dflt)) {
+       if (!fib_detect_death(fi, order, &last_resort, &last_idx, trie_last_dflt)) {
                if (res->fi)
                        fib_info_put(res->fi);
                res->fi = fi;