summaryrefslogtreecommitdiff
path: root/sys/dev/mii
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-28 22:25:41 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-28 22:25:41 +0000
commitab78c0c999f03e6d45f0415a5e9905b3440f2be1 (patch)
treefa4bdaa76a96e9e96137b0df08cf3fdc24f4322a /sys/dev/mii
parent3e921c7dd8d131d23866c66897ecbc8d31ed8cfd (diff)
1. Add a loop_end label to the outer loop
2. Replace a continue statement in an inner loop with goto loop_end This fixes a simple logical bug found with Coccinelle. ok kettenis@
Diffstat (limited to 'sys/dev/mii')
-rw-r--r--sys/dev/mii/mii.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index e6aa5442070..1f0609b8ebe 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mii.c,v 1.21 2010/04/20 20:42:16 deraadt Exp $ */
+/* $OpenBSD: mii.c,v 1.22 2015/12/28 22:25:40 mmcc Exp $ */
/* $NetBSD: mii.c,v 1.19 2000/02/02 17:09:44 thorpej Exp $ */
/*-
@@ -95,7 +95,7 @@ mii_attach(struct device *parent, struct mii_data *mii, int capmask,
* configured at this address.
*/
offset++;
- continue;
+ goto loop_end;
}
}
@@ -144,6 +144,8 @@ mii_attach(struct device *parent, struct mii_data *mii, int capmask,
mii->mii_instance++;
}
offset++;
+
+ loop_end: ;
}
}