diff options
-rw-r--r-- | usr.sbin/ospf6d/carp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ospf6d/carp.c b/usr.sbin/ospf6d/carp.c index d34c277deab..d60ca911a58 100644 --- a/usr.sbin/ospf6d/carp.c +++ b/usr.sbin/ospf6d/carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: carp.c,v 1.1 2007/10/08 10:44:50 norby Exp $ */ +/* $OpenBSD: carp.c,v 1.2 2009/09/30 12:02:18 claudio Exp $ */ /* * Copyright (c) 2006 Henning Brauer <henning@openbsd.org> @@ -90,9 +90,8 @@ carp_demote_shutdown(void) while ((c = TAILQ_FIRST(&carpgroups)) != NULL) { TAILQ_REMOVE(&carpgroups, c, entry); - for (; c->changed_by > 0; c->changed_by--) - if (c->do_demote) - carp_demote_ioctl(c->group, -1); + if (c->do_demote && c->changed_by > 0) + carp_demote_ioctl(c->group, -c->changed_by); free(c->group); free(c); |