summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ripd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ripd')
-rw-r--r--usr.sbin/ripd/parse.y5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y
index 8d74603e22b..2a56760122b 100644
--- a/usr.sbin/ripd/parse.y
+++ b/usr.sbin/ripd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.36 2017/01/05 12:42:19 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.37 2017/01/05 13:53:09 krw Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -780,8 +780,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 & RIPD_OPT_VERBOSE2) && !sym->used)
fprintf(stderr, "warning: macro '%s' not "
"used\n", sym->nam);