diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-01-05 13:53:11 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-01-05 13:53:11 +0000 |
commit | 05d61b27cc969824c325177592534df355abd58d (patch) | |
tree | 6287c94cc868e55169e0796f093f6ce808a33593 /usr.sbin/ospfd/parse.y | |
parent | 0aed917d89631c07c1ff3d30595984d48386ad7e (diff) |
Replace hand-rolled for(;;) emptying of 'symhead' TAILQ with more
modern TAILQ_FOREACH_SAFE().
No intentional functional change.
ok millert@ bluhm@ gilles@
Diffstat (limited to 'usr.sbin/ospfd/parse.y')
-rw-r--r-- | usr.sbin/ospfd/parse.y | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/parse.y b/usr.sbin/ospfd/parse.y index ff6061ac45f..78d5e969f50 100644 --- a/usr.sbin/ospfd/parse.y +++ b/usr.sbin/ospfd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.82 2017/01/05 12:42:18 krw Exp $ */ +/* $OpenBSD: parse.y,v 1.83 2017/01/05 13:53:09 krw Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -1126,8 +1126,7 @@ parse_config(char *filename, int opts) popfile(); /* Free macros and check which have not been used. */ - for (sym = TAILQ_FIRST(&symhead); sym != NULL; sym = next) { - next = TAILQ_NEXT(sym, entry); + TAILQ_FOREACH_SAFE(sym, &symhead, entry, next) { if ((conf->opts & OSPFD_OPT_VERBOSE2) && !sym->used) fprintf(stderr, "warning: macro '%s' not " "used\n", sym->nam); |