summaryrefslogtreecommitdiffstats
path: root/sbin/bsdlabel
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/bsdlabel')
-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 d29763c..dad7cc6 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,
OpenPOWER on IntegriCloud