summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2022-08-12 16:42:55 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2022-08-12 16:42:55 +0000
commit51633523042cb7023f23af74bba8e37149d5f670 (patch)
treed8c8ee06f144f41d03ee222dfacde1747ae642a2 /sys
parent8407f5921a5ec9b8cc890ebabb052c962756ef5f (diff)
Fix non working continue in do while(0) loop.
OK mvs@ jca@ CID 1519492
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_media.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_media.c b/sys/net/if_media.c
index 34beefcdfd5..31a888d5006 100644
--- a/sys/net/if_media.c
+++ b/sys/net/if_media.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_media.c,v 1.37 2022/08/05 13:57:16 bluhm Exp $ */
+/* $OpenBSD: if_media.c,v 1.38 2022/08/12 16:42:54 bluhm Exp $ */
/* $NetBSD: if_media.c,v 1.10 2000/03/13 23:52:39 soren Exp $ */
/*-
@@ -338,7 +338,7 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
return (0);
}
- do {
+ while (1) {
struct ifmedia_entry *ife;
uint64_t *kptr;
size_t ksiz;
@@ -376,7 +376,8 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
error = copyout(kptr, ifmr->ifm_ulist,
nwords * sizeof(*kptr));
free(kptr, M_TEMP, ksiz);
- } while (0);
+ break;
+ }
ifmr->ifm_count = nwords;
break;
}