aboutsummaryrefslogtreecommitdiff
path: root/sbin/bsdlabel/bsdlabel.c
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2002-06-05 08:11:28 +0000
committerIan Dowse <iedowse@FreeBSD.org>2002-06-05 08:11:28 +0000
commit09dbd0701c7afa1777170ab990fac8df61b789e6 (patch)
tree574dee57f22721020bd14e5e3c74602c44c7f1e8 /sbin/bsdlabel/bsdlabel.c
parentfc511333b68089f65d2137fa64e3f0a3f290cdf2 (diff)
downloadsrc-09dbd0701c7afa1777170ab990fac8df61b789e6.tar.gz
src-09dbd0701c7afa1777170ab990fac8df61b789e6.zip
Oops, unbreak parsing of the `type' field in getasciilabel(). I had
changed a `goto' to a `continue' in revision 1.52, but it continued the wrong loop. Noticed by: bde
Notes
Notes: svn path=/head/; revision=97855
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-rw-r--r--sbin/bsdlabel/bsdlabel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index d29763cec8a0..dad7cc68c7e4 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -958,8 +958,10 @@ getasciilabel(FILE *f, struct disklabel *lp)
for (; cpp < &dktypenames[DKMAXTYPES]; cpp++)
if (*cpp && streq(*cpp, tp)) {
lp->d_type = cpp - dktypenames;
- continue;
+ break;
}
+ if (cpp < &dktypenames[DKMAXTYPES])
+ continue;
v = atoi(tp);
if ((unsigned)v >= DKMAXTYPES)
fprintf(stderr, "line %d:%s %d\n", lineno,