]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Save a few bytes
authorRoy Marples <roy@marples.name>
Wed, 31 Oct 2012 23:07:06 +0000 (23:07 +0000)
committerRoy Marples <roy@marples.name>
Wed, 31 Oct 2012 23:07:06 +0000 (23:07 +0000)
ipv6.c

diff --git a/ipv6.c b/ipv6.c
index f56a5d1aeffd8a54b0626fdfea4948a39e74dd93..e50a7484cb83c87046b1a914287ba41d8271fcd8 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -436,7 +436,7 @@ ipv6_build_routes(void)
        /* Remove old routes we used to manage
         * If we own the default route, but not RA management itself
         * then we need to preserve the last best default route we had */
-       TAILQ_FOREACH_REVERSE_SAFE(rt, routes, rt6head, next, rtn) {
+       while ((rt = TAILQ_LAST(routes, rt6head))) {
                TAILQ_REMOVE(routes, rt, next);
                if (find_route6(nrs, rt) == NULL) {
                        if (!have_default &&