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

diff --git a/ipv6.c b/ipv6.c
index 6ddad0027faaf01a837e3a6d5cc8e9b6730e3c52..125b3872291bf9551b6df39d87bb451799661edb 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -429,7 +429,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 &&