diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-12-29 21:24:20 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-12-29 21:24:20 +0000 |
commit | 537e8a17ecb5378d55d242e113052218fa12307a (patch) | |
tree | 01283e24efa3090bbe36c8b8654c7b1253be620c /sys | |
parent | e006900bc79da3b1c88a380c98aed5366e1ccdfd (diff) |
At least try to make this code a bit easier to read. Don't fiddle with x
when xx can do the trick or in dlg's words: "xx was a copy of x so they
could use x for some temp working and restore it from xx later? yeesh"
ok dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/radix.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/net/radix.c b/sys/net/radix.c index 3da7a554702..cd704b9b0a3 100644 --- a/sys/net/radix.c +++ b/sys/net/radix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radix.c,v 1.24 2008/11/21 18:01:30 claudio Exp $ */ +/* $OpenBSD: radix.c,v 1.25 2008/12/29 21:24:19 claudio Exp $ */ /* $NetBSD: radix.c,v 1.20 2003/08/07 16:32:56 agc Exp $ */ /* @@ -597,18 +597,17 @@ rn_addroute(void *v_arg, void *n_arg, struct radix_node_head *head, * parent pointer. */ if (tt == saved_tt && prioinv) { - struct radix_node *xx = x; + struct radix_node *xx; /* link in at head of list */ (tt = treenodes)->rn_dupedkey = t; tt->rn_flags = t->rn_flags; - tt->rn_p = x = t->rn_p; + tt->rn_p = xx = t->rn_p; t->rn_p = tt; - if (x->rn_l == t) - x->rn_l = tt; + if (xx->rn_l == t) + xx->rn_l = tt; else - x->rn_r = tt; + xx->rn_r = tt; saved_tt = tt; - x = xx; } else if (prioinv == 1) { (tt = treenodes)->rn_dupedkey = t; if (t->rn_p == NULL) |