summaryrefslogtreecommitdiffstats
path: root/usr.sbin/hostapd
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2017-01-05 13:53:09 +0000
committerkrw <krw@openbsd.org>2017-01-05 13:53:09 +0000
commit46bca67b3afccd3408e91051f21093eb9ea0522a (patch)
treee2329f09474909da5e59097583649ef3f445e466 /usr.sbin/hostapd
parentAvoid a side-channel cache-timing attack that can leak the ECDSA private (diff)
downloadwireguard-openbsd-46bca67b3afccd3408e91051f21093eb9ea0522a.tar.xz
wireguard-openbsd-46bca67b3afccd3408e91051f21093eb9ea0522a.zip
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/hostapd')
-rw-r--r--usr.sbin/hostapd/parse.y5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/hostapd/parse.y b/usr.sbin/hostapd/parse.y
index b7dab97d3e9..eff199d93a1 100644
--- a/usr.sbin/hostapd/parse.y
+++ b/usr.sbin/hostapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.52 2017/01/05 12:42:18 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.53 2017/01/05 13:53:09 krw Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1774,8 +1774,7 @@ hostapd_parse_file(struct hostapd_config *cfg)
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 (!sym->used)
hostapd_log(HOSTAPD_LOG_VERBOSE,
"warning: macro '%s' not used", sym->nam);