summaryrefslogtreecommitdiff
path: root/sys/dev/ic/if_wi_hostap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/if_wi_hostap.c')
-rw-r--r--sys/dev/ic/if_wi_hostap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c
index 7ce07f3a765..0a47b6a0f16 100644
--- a/sys/dev/ic/if_wi_hostap.c
+++ b/sys/dev/ic/if_wi_hostap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_hostap.c,v 1.44 2014/07/22 13:12:12 mpi Exp $ */
+/* $OpenBSD: if_wi_hostap.c,v 1.45 2014/09/13 16:06:37 doug Exp $ */
/*
* Copyright (c) 2002
@@ -287,8 +287,7 @@ wihap_shutdown(struct wi_softc *sc)
timeout_del(&whi->tmo);
/* Delete all stations from the list. */
- for (sta = TAILQ_FIRST(&whi->sta_list);
- sta != TAILQ_END(&whi->sta_list); sta = next) {
+ for (sta = TAILQ_FIRST(&whi->sta_list); sta != NULL; sta = next) {
timeout_del(&sta->tmo);
if (sc->sc_ic.ic_if.if_flags & IFF_DEBUG)
printf("wihap_shutdown: free(sta=%p)\n", sta);
@@ -351,8 +350,8 @@ wihap_timeout(void *v)
s = splnet();
for (i = 10, sta = TAILQ_FIRST(&whi->sta_list);
- i != 0 && sta != TAILQ_END(&whi->sta_list) &&
- (sta->flags & WI_SIFLAGS_DEAD); i--, sta = next) {
+ i != 0 && sta != NULL && (sta->flags & WI_SIFLAGS_DEAD);
+ i--, sta = next) {
next = TAILQ_NEXT(sta, list);
if (timeout_pending(&sta->tmo)) {
/* Became alive again, move to end of list. */